Home > PHP > Function > GnuPG > gnupg_decrypt()

gnupg_decrypt()

gnupg_decrypt - Decrypts a given text

Syntax

string gnupg_decrypt (resource $identifier, string $text)

Arguments

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

Description

Decrypts the given text with the keys, which were set with gnupg_adddecryptkeybefore.

Version

PHP PECL gnupg >= 0.1

Return value

On success, this function returns the decrypted text. On failure, this function returns FALSE.