supported()
supported() : boolean
Is this driver supported?
Returns
boolean —True if supported.
Abstract backend class to implement PGP functionality.
NOTE: This class is NOT intended to be accessed outside of this package. There is NO guarantees that the API of this class will not change across versions.
generateKey(array $opts) : \Horde_Pgp_Key_Private
Generates a private key.
array | $opts | Configuration:
|
The generated private key.
encrypt(string $text, array $keys, array $opts) : \Horde_Pgp_Element_Message
Encrypts text using PGP public keys.
string | $text | The text to be PGP encrypted. |
array | $keys | The list of public keys to encrypt (Horde_Pgp_Element_PublicKey objects). |
array | $opts | Additional options:
|
The encrypted message.
encryptSymmetric(string $text, array $passphrase, array $opts) : \Horde_Pgp_Element_Message
Encrypts text using a PGP symmetric passphrase.
string | $text | The text to be PGP encrypted. |
array | $passphrase | The symmetric passphrase(s). |
array | $opts | Additional options:
|
The encrypted message.
sign(string $text, \Horde_Pgp_Element_PrivateKey $key, integer $mode, array $opts = array()) : mixed
Sign a message using a PGP private key.
string | $text | The text to be PGP signed. |
\Horde_Pgp_Element_PrivateKey | $key | The private key to use for signing. |
integer | $mode | The signing mode. Either 'clear', 'detach', or 'message'. |
array | $opts | Additional options:
|
The signed message.
decrypt(\Horde_Pgp_Element_Message $msg, \Horde_Pgp_Element_PrivateKey $key) : \Horde_Pgp_Element_Message
Decrypts text using a PGP private key.
\Horde_Pgp_Element_Message | $msg | The message to be decrypted. |
\Horde_Pgp_Element_PrivateKey | $key | The private key to use for decryption. |
The decrypted message.
decryptSymmetric(\Horde_Pgp_Element_Message $msg, string $passphrase) : \Horde_Pgp_Element_Message
Decrypts text using a PGP symmetric passphrase.
\Horde_Pgp_Element_Message | $msg | The message to be decrypted. |
string | $passphrase | The symmetric passphrase used to encrypt the data. |
The decrypted message.
verify(\Horde_Pgp_Element $msg, \Horde_Pgp_Element_PublicKey $key) : array
Verifies data using a PGP public key.
\Horde_Pgp_Element | $msg | The text to be verified. |
\Horde_Pgp_Element_PublicKey | $key | Public key used for signing. |
{@see Horde_Pgp#verify()}.