Property | Type | Description | |
---|---|---|---|
$_backends | array | List of initialized backends. | |
$_params | array | Configuration parameters. |
Method | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
decrypt ( mixed $text, mixed $key ) : Horde_Pgp_Element_Message | Decrypts text using a PGP private key. | |
decryptSymmetric ( mixed $text, string $passphrase ) : array | Decrypts text using a PGP symmetric passphrase. | |
encrypt ( string $text, mixed $keys, array $opts = [] ) : Horde_Pgp_Element_Message | Encrypts text using PGP public keys. | |
encryptSymmetric ( string $text, mixed $passphrase, array $opts = [] ) : Horde_Pgp_Element_Message | Encrypts text using a PGP symmetric passphrase. | |
generateKey ( string $name, string $email, array $opts = [] ) : Horde_Pgp_Key_Private | Generates a private key. | |
sign ( string $text, mixed $key, array $opts = [] ) : Horde_Pgp_Element_Message | Sign data using a PGP private key. | |
signCleartext ( string $text, mixed $key, array $opts = [] ) : Horde_Pgp_Element_SignedMessage | Sign data using a PGP private key, creating cleartext output. | |
signDetached ( string $text, mixed $key, array $opts = [] ) : Horde_Pgp_Element_Signature | Sign data using a PGP private key, returning a detached signature. | |
verify ( mixed $text, mixed $key ) : array | Verifies text using a PGP public key. | |
verifyDetached ( mixed $text, mixed $sig, mixed $key ) : { | Verifies text using a PGP public key and a detached signature. |
Method | Description | |
---|---|---|
_getCipher ( $opts, $default ) | TODO | |
_getCompression ( $opts, $default ) | TODO | |
_getOption ( $opts, $default, $name, $map ) | TODO | |
_getPrivateKey ( $key ) | TODO | |
_initDrivers ( ) | Initialize the backend driver list. | |
_runInBackend ( $cmd, $args, $error ) | TODO |
public __construct ( array $params = [] ) | ||
$params | array | Configuration parameters: - backends: (array) The explicit list of backend drivers (Horde_Pgp_Backend objects) to use. |
public decryptSymmetric ( mixed $text, string $passphrase ) : array | ||
$text | mixed | The text to be decrypted. |
$passphrase | string | The symmetric passphrase used to encrypt the data. |
return | array | $data Array of decrypted data. Outer array indicates a message block. Each entry is an array with two array elements: a list of data packets contained in that message block and a list of signature data associated with that block. |
public encrypt ( string $text, mixed $keys, array $opts = [] ) : Horde_Pgp_Element_Message | ||
$text | string | The text to be encrypted. |
$keys | mixed | The list of public keys to encrypt. |
$opts | array | Additional options: - cipher: (string) Default symmetric cipher algorithm to use. One of: 3DES, CAST5, AES128, AES192, AES256, Twofish. - compress: (string) Default compression to use. One of: NONE, ZIP, ZLIB |
return | Horde_Pgp_Element_Message | The encrypted data. |
public encryptSymmetric ( string $text, mixed $passphrase, array $opts = [] ) : Horde_Pgp_Element_Message | ||
$text | string | The text to be encrypted. |
$passphrase | mixed | The symmetric passphrase(s). |
$opts | array | Additional options: - cipher: (string) Default symmetric cipher algorithm to use. One of: 3DES, CAST5, AES128, AES192, AES256, Twofish. - compress: (string) Default compression to use. One of: NONE, ZIP, ZLIB |
return | Horde_Pgp_Element_Message | The encrypted data. |
public generateKey ( string $name, string $email, array $opts = [] ) : Horde_Pgp_Key_Private | ||
$name | string | Full name. |
string | E-mail. | |
$opts | array | Additional options: - comment: (string) Comment. - hash: (string) Hash function. - expire: (integer) Expiration date (UNIX timestamp). - keylength: (integer) Key length. - passphrase: (string) Passphrase. |
return | Horde_Pgp_Key_Private | The generated private key. |
public sign ( string $text, mixed $key, array $opts = [] ) : Horde_Pgp_Element_Message | ||
$text | string | The text to be signed. |
$key | mixed | The private key to use for signing (must be decrypted). |
$opts | array | Additional options: - compress: (string) Default compression to use. One of: NONE, ZIP, ZLIB - sign_hash: (string) The hash method to use. |
return | Horde_Pgp_Element_Message | The signed data. |
public signCleartext ( string $text, mixed $key, array $opts = [] ) : Horde_Pgp_Element_SignedMessage | ||
$text | string | The text to be signed. |
$key | mixed | The private key to use for signing (must be decrypted). |
$opts | array | Additional options: - sign_hash: (string) The hash method to use. |
return | Horde_Pgp_Element_SignedMessage | The signed data. |
public signDetached ( string $text, mixed $key, array $opts = [] ) : Horde_Pgp_Element_Signature | ||
$text | string | The text to be signed. |
$key | mixed | The private key to use for signing (must be decrypted). |
$opts | array | Additional options: - sign_hash: (string) The hash method to use. |
return | Horde_Pgp_Element_Signature | The detached signature. |
protected array $_backends | ||
return | array |