Symmetric encryption using the Mcrypt extension
NOTE: DO NOT USE only this class to encrypt data. This class doesn’t provide authentication and integrity check over the data. PLEASE USE ZendCryptBlockCipher instead!
Constructor
| Parameters: | array|Traversable – |
|---|---|
| Throws ExceptionRuntimeException: | |
| Throws ExceptionInvalidArgumentException: | |
Set default options
| Parameters: | array – |
|---|---|
| Return type: | void |
Returns the padding plugin manager. If it doesn’t exist it’s created.
| Return type: | PaddingPluginManager |
|---|
Set the padding plugin manager
| Parameters: | string|PaddingPluginManager – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | void |
Get the maximum key size for the selected cipher and mode of operation
| Return type: | integer |
|---|
Set the encryption key
| Parameters: | string – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Mcrypt |
Set the encryption algorithm (cipher)
| Parameters: | string – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Mcrypt |
Set the padding object
| Parameters: | PaddingPaddingInterface – |
|---|---|
| Return type: | Mcrypt |
Encrypt
| Parameters: | string – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | string |
Decrypt
| Parameters: | string – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | string |
Get the supported algorithms
| Return type: | array |
|---|
Set the salt (IV)
| Parameters: | string – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Mcrypt |
Get the salt (IV) according to the size requested by the algorithm
| Return type: | string |
|---|
Set the cipher mode
| Parameters: | string – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
| Return type: | Mcrypt |