Метод | Описание | |
---|---|---|
__construct ( ) | Constructor. | |
autoload ( ) | Autoload necessary libraries. | |
decrypt ( $msg, $key ) | ||
decryptSymmetric ( $msg, $passphrase ) | ||
encrypt ( $text, $keys, $opts ) | ||
encryptSymmetric ( $text, $passphrase, $opts ) | ||
generateKey ( $opts ) | ||
sign ( $text, $key, $mode, $opts = [] ) | ||
verify ( $msg, $key ) |
Метод | Описание | |
---|---|---|
_compressMessageOb ( OpenPGP_Message $msg, integer $algo ) : OpenPGP_Message | Compress PGP data, if compression is available. | |
_encrypt ( mixed $key, mixed $data, array $opts ) | Encrypt data. | |
_encryptPrivateKey ( OpenPGP_SecretKeyPacket $p, phpseclib\Crypt\RSA $cipher, OpenPGP_S2K $s2k, string $iv ) | Encrypt a secret key packet. | |
_generateSecretKeyPacket ( integer $keylength, string $packet_type ) : OpenPGP_SecretKeyPacket | Generate a RSA secret key (sub)packet. | |
_getMessageOb ( mixed $data ) : OpenPGP_Message | Create a OpenPGP message object, inserting text data into a literal data packet. |
protected _compressMessageOb ( OpenPGP_Message $msg, integer $algo ) : OpenPGP_Message | ||
$msg | OpenPGP_Message | PGP message. |
$algo | integer | Compression algorithm. |
Результат | OpenPGP_Message | (Possibly compressed) message. |
protected _encryptPrivateKey ( OpenPGP_SecretKeyPacket $p, phpseclib\Crypt\RSA $cipher, OpenPGP_S2K $s2k, string $iv ) | ||
$p | OpenPGP_SecretKeyPacket | Secret key packet. |
$cipher | phpseclib\Crypt\RSA | RSA cipher object. |
$s2k | OpenPGP_S2K | OpenPGP String-to-key object. |
$iv | string | Initial vector. |
protected _generateSecretKeyPacket ( integer $keylength, string $packet_type ) : OpenPGP_SecretKeyPacket | ||
$keylength | integer | RSA keylength. |
$packet_type | string | Secret key packet to create. |
Результат | OpenPGP_SecretKeyPacket | Secret key packet object. |
protected _getMessageOb ( mixed $data ) : OpenPGP_Message | ||
$data | mixed | Data. |
Результат | OpenPGP_Message | Message object. |