메소드 | 설명 | |
---|---|---|
decryptMessage ( string $text, array $params ) : object | Decrypts an PGP encrypted message using a private/public keypair and a passhprase. | |
decryptSignature ( string $text, array $params ) : object | Decrypts an PGP signed message using a public key. | |
encryptMessage ( string $text, array $params ) : string | Encrypts a message in PGP format using a public key. | |
encryptSignature ( string $text, array $params ) : string | Signs a message in PGP format using a private key. | |
generateKey ( array $opts ) : mixed | Generates a personal public/private keypair combination. | |
getFingerprintsFromKey ( string $pgpdata ) : array | Get the fingerprints from a key block. | |
getPublicKeyFromPrivateKey ( string $data ) : string | Generates a public key from a private key. | |
getSignersKeyId ( string $text ) : mixed | Returns the key ID of the key used to sign a block of PGP data. | |
isEncryptedSymmetrically ( string $text ) : boolean | Returns whether a text has been encrypted symmetrically. | |
packetInfo ( string $pgpdata ) : array | Returns information on a PGP data block. | |
packetInfoMultiple ( string $pgpdata ) : array | Returns all information on a PGP data block. | |
supported ( ) : boolean | Is this driver supported? |
public decryptMessage ( string $text, array $params ) : object | ||
$text | string | The text to be decrypted. |
$params | array | The parameters needed for decryption. - no_passphrase: Passphrase is not required. - passphrase: Passphrase for PGP Key. (REQUIRED, see no_passphrase) - privkey: PGP private key. (REQUIRED for asymmetric encryption) - pubkey: PGP public key. (REQUIRED for asymmetric encryption) - type: [REQUIRED] 'message' |
리턴 | object | An object with the following properties: - message: (string) The signature result text. - result: (boolean) The result of the signature test. |
public decryptSignature ( string $text, array $params ) : object | ||
$text | string | The text to be verified. |
$params | array | The parameters needed for verification. - charset: Charset of the message body. - pubkey: [REQUIRED] PGP public key. - signature: PGP signature block. (REQUIRED for detached signature) - type: [REQUIRED] 'signature' or 'detached-signature' |
리턴 | object | An object with the following properties: - message: (string) The signature result text. - result: (boolean) The result of the signature test. |
public encryptMessage ( string $text, array $params ) : string | ||
$text | string | The text to be encrypted. |
$params | array | The parameters needed for encryption. - passphrase: The passphrase for the symmetric encryption (REQUIRED if 'symmetric' is true) - recips: An array with the e-mail address of the recipient as the key and that person's public key as the value. (REQUIRED if 'symmetric' is false) - symmetric: Whether to use symmetric instead of asymmetric encryption (defaults to false). - type: [REQUIRED] 'message' |
리턴 | string | The encrypted message. |
public encryptSignature ( string $text, array $params ) : string | ||
$text | string | The text to be signed. |
$params | array | The parameters needed for signing. - passphrase: [REQUIRED] Passphrase for PGP Key. - privkey: [REQUIRED] PGP private key. - pubkey: [REQUIRED] PGP public key. - sigtype: Determine the signature type to use. - 'cleartext': Make a clear text signature - 'detach': Make a detached signature (DEFAULT) - type: [REQUIRED] 'signature' |
리턴 | string | The signed message. |
public generateKey ( array $opts ) : mixed | ||
$opts | array | Configuration: - comment: (string) The comment to use. - email: (string) The email to use. - expire: (integer) The expiration date (UNIX timestamp). No expiration if empty. - keylength: (integer) The keylength to use. - key_type: (string) Key type. - name: (string) The name to use. - passphrase: (string) The passphrase to use. - subkey_type: (string) Subkey type. |
리턴 | mixed | False on error; an array on success consisting of the following keys/values: - private: (string) Private key. - public: (string) Public key. |
public getFingerprintsFromKey ( string $pgpdata ) : array | ||
$pgpdata | string | The PGP data block. |
리턴 | array | The fingerprints in $pgpdata indexed by key id. |
public getPublicKeyFromPrivateKey ( string $data ) : string | ||
$data | string | Armor text of private key. |
리턴 | string | Armor text of public key. |
public getSignersKeyId ( string $text ) : mixed | ||
$text | string | The PGP signed text block. |
리턴 | mixed | The key ID of the key used to sign $text. |
public isEncryptedSymmetrically ( string $text ) : boolean | ||
$text | string | The PGP encrypted text. |
리턴 | boolean | True if the text is symmetrically encrypted. |
public packetInfo ( string $pgpdata ) : array | ||
$pgpdata | string | The PGP data block. |
리턴 | array | An array with information on the PGP data block. {@see \Horde_Crypt_Pgp::pgpPacketInformation()} |
public packetInfoMultiple ( string $pgpdata ) : array | ||
$pgpdata | string | The PGP data block. |
리턴 | array | An array with information on the PGP data block. {@see \Horde_Crypt_Pgp::pgpPacketInformationMultiple()} |