Fully Qualified Name: | Laminas\Crypt\BlockCipher |
Encrypt using a symmetric cipher then authenticate using HMAC (SHA-256)
Name | Description | Defined By |
---|---|---|
__construct() | Constructor | BlockCipher |
decrypt() | Decrypt | BlockCipher |
encrypt() | Encrypt then authenticate using HMAC | BlockCipher |
factory() | Factory | BlockCipher |
getBinaryOutput() | Get the value of binary output | BlockCipher |
getCipher() | Get symmetric cipher | BlockCipher |
getCipherAlgorithm() | Get the cipher algorithm | BlockCipher |
getCipherSupportedAlgorithms() | Get the supported algorithms of the symmetric cipher | BlockCipher |
getHashAlgorithm() | Get the hash algorithm for HMAC authentication | BlockCipher |
getKey() | Get the key | BlockCipher |
getKeyIteration() | Get the number of iterations for Pbkdf2 | BlockCipher |
getOriginalSalt() | Get the original salt value | BlockCipher |
getPbkdf2HashAlgorithm() | Get the Pbkdf2 hash algorithm | BlockCipher |
getSalt() | Get the salt (IV) according to the size requested by the algorithm | BlockCipher |
getSymmetricPluginManager() | Returns the symmetric cipher plugin manager. If it doesn't exist it's created. | BlockCipher |
setBinaryOutput() | Enable/disable the binary output | BlockCipher |
setCipher() | Set the symmetric cipher | BlockCipher |
setCipherAlgorithm() | Set algorithm of the symmetric cipher | BlockCipher |
setHashAlgorithm() | Set the hash algorithm for HMAC authentication | BlockCipher |
setKey() | Set the encryption/decryption key | BlockCipher |
setKeyIteration() | Set the number of iterations for Pbkdf2 | BlockCipher |
setPbkdf2HashAlgorithm() | Set the hash algorithm for the Pbkdf2 | BlockCipher |
setSalt() | Set the salt (IV) | BlockCipher |
setSymmetricPluginManager() | Set the symmetric cipher plugin manager | BlockCipher |
Constructor
Parameter Name | Type | Description |
---|---|---|
$cipher | \SymmetricInterface |
Returns:
Decrypt
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: string|bool
Encrypt then authenticate using HMAC
Parameter Name | Type | Description |
---|---|---|
$data | string |
Returns: string
Factory
Parameter Name | Type | Description |
---|---|---|
$adapter | string | |
$options | array |
Returns: \BlockCipher
Get the value of binary output
Returns: bool
Get symmetric cipher
Returns: \SymmetricInterface
Get the cipher algorithm
Returns: string|bool
Get the supported algorithms of the symmetric cipher
Returns: array
Get the hash algorithm for HMAC authentication
Returns: string
Get the key
Returns: string
Get the number of iterations for Pbkdf2
Returns: int
Get the original salt value
Returns: string
Get the Pbkdf2 hash algorithm
Returns: string
Get the salt (IV) according to the size requested by the algorithm
Returns: string
Returns the symmetric cipher plugin manager. If it doesn't exist it's created.
Returns: \ContainerInterface
Enable/disable the binary output
Parameter Name | Type | Description |
---|---|---|
$value | bool |
Returns: \BlockCipher Provides a fluent interface
Set the symmetric cipher
Parameter Name | Type | Description |
---|---|---|
$cipher | \SymmetricInterface |
Returns: \BlockCipher Provides a fluent interface
Set algorithm of the symmetric cipher
Parameter Name | Type | Description |
---|---|---|
$algo | string |
Returns: \BlockCipher Provides a fluent interface
Set the hash algorithm for HMAC authentication
Parameter Name | Type | Description |
---|---|---|
$hash | string |
Returns: \BlockCipher Provides a fluent interface
Set the encryption/decryption key
Parameter Name | Type | Description |
---|---|---|
$key | string |
Returns: \BlockCipher Provides a fluent interface
Set the number of iterations for Pbkdf2
Parameter Name | Type | Description |
---|---|---|
$num | int |
Returns: \BlockCipher Provides a fluent interface
Set the hash algorithm for the Pbkdf2
Parameter Name | Type | Description |
---|---|---|
$hash | string |
Returns: \BlockCipher Provides a fluent interface
Set the salt (IV)
Parameter Name | Type | Description |
---|---|---|
$salt | string |
Returns: \BlockCipher Provides a fluent interface
Set the symmetric cipher plugin manager
Parameter Name | Type | Description |
---|---|---|
$plugins | string|\SymmetricPluginManager |
Returns: