Home > PHP > Function > GnuPG > gnupg_encryptsign()

gnupg_encryptsign()

gnupg_encryptsign - Encrypts and signs a given text

Syntax

string gnupg_encryptsign (resource $identifier, string $plaintext)

Arguments

  • identifier - The gnupg identifier, from a call to gnupg_init() or gnupg.
  • plaintext - The text being encrypted.

Description

Encrypts and signs the given plaintext with the keys, which were set with gnupg_addsignkeyand gnupg_addencryptkeybefore and returns the encrypted and signed text.

Version

PHP PECL gnupg >= 0.2

Return value

On success, this function returns the encrypted and signed text. On failure, this function returns FALSE.