Fully Qualified Name: | Zend\Crypt\Hybrid |
Hybrid encryption (OpenPGP like)
The data are encrypted using a BlockCipher with a random session key that is encrypted using RSA with the public key of the receiver. The decryption process retrieves the session key using RSA with the private key of the receiver and decrypts the data using the BlockCipher.
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | Hybrid |
decrypt() | Decrypt using a private key | Hybrid |
encrypt() | Encrypt using a keyrings | Hybrid |
getBlockCipherInstance() | Get the BlockCipher adapter | Hybrid |
getRsaInstance() | Get the Rsa instance | Hybrid |
Constructor
Parameter Name | Type | Description |
---|---|---|
$bCipher | \BlockCipher | |
$rsa | \PublicKey\Rsa |
Returns:
Decrypt using a private key
Parameter Name | Type | Description |
---|---|---|
$msg | string | |
$privateKey | string | |
$passPhrase | string | |
$id | string |
Returns: string
Encrypt using a keyrings
Parameter Name | Type | Description |
---|---|---|
$plaintext | string | |
$keys | array|string |
Returns: string
Get the BlockCipher adapter
Returns: \BlockCipher
Get the Rsa instance
Returns: \Rsa