PGP_ARMOR
PGP_ARMOR
Extend the PGP object to produce MIME PGP data (RFC 3156).
generateKey(string $name, string $email, array $opts = array()) : \Horde_Pgp_Key_Private
Generates a private key.
string | $name | Full name. |
string | E-mail. |
|
array | $opts | Additional options:
|
The generated private key.
encrypt(string $text, mixed $keys, array $opts = array()) : \Horde_Pgp_Element_Message
Encrypts text using PGP public keys.
string | $text | The text to be encrypted. |
mixed | $keys | The list of public keys to encrypt. |
array | $opts | Additional options:
|
The encrypted data.
encryptSymmetric(string $text, mixed $passphrase, array $opts = array()) : \Horde_Pgp_Element_Message
Encrypts text using a PGP symmetric passphrase.
string | $text | The text to be encrypted. |
mixed | $passphrase | The symmetric passphrase(s). |
array | $opts | Additional options:
|
The encrypted data.
sign(string $text, mixed $key, array $opts = array()) : \Horde_Pgp_Element_Message
Sign data using a PGP private key.
Returns message object that contains both the signed data and the signature packet.
string | $text | The text to be signed. |
mixed | $key | The private key to use for signing (must be decrypted). |
array | $opts | Additional options:
|
The signed data.
signCleartext(string $text, mixed $key, array $opts = array()) : \Horde_Pgp_Element_SignedMessage
Sign data using a PGP private key, creating cleartext output.
string | $text | The text to be signed. |
mixed | $key | The private key to use for signing (must be decrypted). |
array | $opts | Additional options:
|
The signed data.
signDetached(string $text, mixed $key, array $opts = array()) : \Horde_Pgp_Element_Signature
Sign data using a PGP private key, returning a detached signature.
string | $text | The text to be signed. |
mixed | $key | The private key to use for signing (must be decrypted). |
array | $opts | Additional options:
|
The detached signature.
decrypt(mixed $text, mixed $key) : \Horde_Pgp_Element_Message
Decrypts text using a PGP private key.
mixed | $text | The text to be decrypted. |
mixed | $key | The private key to use for decryption (must be decrypted). |
$msg The decrypted message.
decryptSymmetric(mixed $text, string $passphrase) : array
Decrypts text using a PGP symmetric passphrase.
mixed | $text | The text to be decrypted. |
string | $passphrase | The symmetric passphrase used to encrypt the data. |
$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.
verify(mixed $text, mixed $key) : array
Verifies text using a PGP public key.
mixed | $text | The text to be verified |
mixed | $key | The public key used for signing. |
List of verified packets. Each sub array contains two values: the list of packets verfied by signing and the list of signature packets used to verify.
verifyDetached(mixed $text, mixed $sig, mixed $key) : \{@see
Verifies text using a PGP public key and a detached signature.
mixed | $text | The text to be verified |
mixed | $sig | The detached signature. |
mixed | $key | The public key used for signing. |
detach()}
signPart(\Horde_Mime_Part $part, mixed $key, array $opts = array()) : \Horde_Mime_Part
Signs a MIME part using PGP.
\Horde_Mime_Part | $part | The object to sign. |
mixed | $key | The private key to use for signing (must be decrypted). |
array | $opts | Additional options:
|
A signed object.
encryptPart(\Horde_Mime_Part $part, array $opts = array()) : \Horde_Mime_Part
Encrypts a MIME part using PGP.
\Horde_Mime_Part | $part | The object to encrypt. |
array | $opts | Additional options:
|
An encrypted object.
signAndEncryptPart(\Horde_Mime_Part $part, mixed $privkey, array $opts = array()) : \Horde_Mime_Part
Signs and encrypts a MIME part using PGP.
\Horde_Mime_Part | $part | The part to sign and encrypt. |
mixed | $privkey | The private key to use for signing (must be decrypted). |
array | $opts | Additional options:
|
A signed and encrypted part.
armorToPart(mixed $input, array $opts = array()) : mixed
Converts armored input into a Horde_Mime_Part object.
mixed | $input | Armored input. |
array | $opts | Additional options:
|
Either null if no PGP data was found, or a Horde_Mime_Part object.
_encryptBase(\Horde_Pgp_Element_Message $encrypted) : \Horde_Mime_Part
Create the base MIME part used for encryption (RFC 3156 [4]).
\Horde_Pgp_Element_Message | $encrypted | Encrypted data. |
Base encrypted MIME part.