PHP gnupg Functions

EditRocket provides the following information on gnupg functions in the PHP source code builder.

bool gnupg_adddecryptkey ( resource $identifier , string $fingerprint , string $passphrase ) -

bool gnupg_addencryptkey ( resource $identifier , string $fingerprint ) -

bool gnupg_addsignkey ( resource $identifier , string $fingerprint [, string $passphrase ] ) -

bool gnupg_cleardecryptkeys ( resource $identifier ) -

bool gnupg_clearencryptkeys ( resource $identifier ) -

bool gnupg_clearsignkeys ( resource $identifier ) -

string gnupg_decrypt ( resource $identifier , string $text ) -

array gnupg_decryptverify ( resource $identifier , string $text , string &$plaintext ) - Decrypts and verifies a given text and returns information about the signature. The parameter plaintext gets filled with the decrypted text.

string gnupg_encrypt ( resource $identifier , string $plaintext ) -

string gnupg_encryptsign ( resource $identifier , string $plaintext ) -

string gnupg_export ( resource $identifier , string $fingerprint ) - Exports the key fingerprint.

string gnupg_geterror ( resource $identifier ) -

int gnupg_getprotocol ( resource $identifier ) -

array gnupg_import ( resource $identifier , string $keydata ) - Imports the key keydata and returns an array with information about the importprocess.

array gnupg_keyinfo ( resource $identifier , string $pattern ) -

bool gnupg_setarmor ( resource $identifier , int $armor ) - Pass a non-zero integer-value to this function to enable armored-output (default). Pass 0 to disable armored output.

void gnupg_seterrormode ( resource $identifier , int $errormode ) - errormode takes a constant indicating what type of error_reporting should be used. The possible values are GNUPG_ERROR_WARNING, GNUPG_ERROR_EXCEPTION and GNUPG_ERROR_SILENT. By default GNUPG_ERROR_SILENT is used.

bool gnupg_setsignmode ( resource $identifier , int $signmode ) - signmode takes a constant indicating what type of signature should be produced. The possible values are GNUPG_SIG_MODE_NORMAL, GNUPG_SIG_MODE_DETACH and GNUPG_SIG_MODE_CLEAR. By default GNUPG_SIG_MODE_CLEAR is used.

string gnupg_sign ( resource $identifier , string $plaintext ) -

array gnupg_verify ( resource $identifier , string $signed_text , string $signature [, string &$plaintext ] ) - Verifies the given signed_text and returns information about the signature. To verify a clearsigned text, set signature to FALSE. If the optional parameter plaintext is passed, it is filled with the plaintext.