NOTE: DO NOT USE only this class to encrypt data.
This class doesn't provide authentication and integrity check over the data.
PLEASE USE Zend\Crypt\BlockCipher instead!
Methods
Constructor
__construct(array | \Traversable $options)
Parameters
$options
array\Traversable
Exceptions
Decrypt
decrypt(string $data) : string
Parameters
$data
string
Exceptions
Returns
string
Encrypt
encrypt(string $data) : string
Parameters
$data
string
Exceptions
Returns
string
Get the encryption algorithm
getAlgorithm() : string
Get the block size
getBlockSize() : int
Get the encryption key
getKey() : string
Get the maximum key size for the selected cipher and mode of operation
getKeySize() : int
Get the cipher mode
getMode() : string
Get the original salt value
getOriginalSalt() : string
Get the salt (IV) according to the size requested by the algorithm
getSalt() : string
Get the salt (IV) size
getSaltSize() : int
Get the supported algorithms
getSupportedAlgorithms() : array
Get all supported encryption modes
getSupportedModes() : array
Set the encryption key
If the key is longer than maximum supported, it will be truncated by getKey().
setKey(string $key) : \Zend\Crypt\Symmetric\Mcrypt
Parameters
$key
string
Exceptions
Returns
Set default options
setDefaultOptions(array $options) : void
Parameters
$options
array
Properties
Encryption algorithm
$algo : string
Encryption mode
$mode : string
Supported cipher algorithms
$supportedAlgos : array
Supported encryption modes
$supportedModes : array
Constants
DEFAULT_PADDING
DEFAULT_PADDING