Methods
Constructor
__construct(\Zend\Crypt\Symmetric\SymmetricInterface $cipher)
Decrypt
decrypt(string $data) : string | bool
Parameters
$data
string
Exceptions
Returns
string
bool
Encrypt then authenticate using HMAC
encrypt(string $data) : string
Parameters
$data
string
Exceptions
Returns
string
Factory.
factory(string $adapter, array $options) : \Zend\Crypt\BlockCipher
Parameters
$adapter
string
$options
array
Returns
Get the value of binary output
getBinaryOutput() : bool
Get the cipher algorithm
getCipherAlgorithm() : string | bool
Get the supported algorithms of the symmetric cipher
getCipherSupportedAlgorithms() : array
Get the hash algorithm for HMAC authentication
getHashAlgorithm() : string
Get the key
getKey() : string
Get the number of iterations for Pbkdf2
getKeyIteration() : int
Get the original salt value
getOriginalSalt() : string
Get the Pbkdf2 hash algorithm
getPbkdf2HashAlgorithm() : string
Get the salt (IV) according to the size requested by the algorithm
getSalt() : string
Enable/disable the binary output
setBinaryOutput(bool $value) : \Zend\Crypt\BlockCipher
Parameters
$value
bool
Returns
Set algorithm of the symmetric cipher
setCipherAlgorithm(string $algo) : \Zend\Crypt\BlockCipher
Parameters
$algo
string
Exceptions
Returns
Set the hash algorithm for HMAC authentication
setHashAlgorithm(string $hash) : \Zend\Crypt\BlockCipher
Parameters
$hash
string
Exceptions
Returns
Set the encryption/decryption key
setKey(string $key) : \Zend\Crypt\BlockCipher
Parameters
$key
string
Exceptions
Returns
Set the number of iterations for Pbkdf2
setKeyIteration(int $num) : \Zend\Crypt\BlockCipher
Parameters
$num
int
Returns
Set the hash algorithm for the Pbkdf2
setPbkdf2HashAlgorithm(string $hash) : \Zend\Crypt\BlockCipher
Parameters
$hash
string
Exceptions
Returns
Properties
The output is binary?
$binaryOutput : bool
Hash algorithm for HMAC
$hash : string
Number of iterations for Pbkdf2
$keyIteration : string
Hash algorithm for Pbkdf2
$pbkdf2Hash : string
Check if the salt has been set
$saltSetted : bool