Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Encryption adapter for mcrypt

$_encryption= 'array(
'key' => 'ZendFramework''
Definitions for encryption array( 'key' => encryption key string 'algorithm' => algorithm to use 'algorithm_directory' => directory where to find the algorithm 'mode' => encryption mode to use 'modedirectory' => directory where to find the mode )
array(
'key' => 'ZendFramework'
Details
__construct(
string|array|\Zend_Config $options
)
:
void
Class constructor
Name | Type | Description |
---|---|---|
$options | string|array|\Zend_Config | Cryption Options |

_closeCipher(
resource $cipher
)
:
\Zend_Filter_Encrypt_Mcrypt
Close a cipher
Name | Type | Description |
---|---|---|
$cipher | resource | Cipher to close |
Type | Description |
---|---|
\Zend_Filter_Encrypt_Mcrypt |

_initCipher(
resource $cipher
)
:
resource
Initialises the cipher with the set key
Name | Type | Description |
---|---|---|
$cipher | resource |
Type | Description |
---|---|
resource |
Exception | Description |
---|---|

_openCipher(
)
:
resource
Open a cipher
Type | Description |
---|---|
resource | Returns the opened cipher |
Exception | Description |
---|---|
\Zend_Filter_Exception | When the cipher can not be opened |

decrypt(
string $value
)
:
string
Defined by Zend_Filter_Interface
Decrypts $value with the defined settings
Name | Type | Description |
---|---|---|
$value | string | Content to decrypt |
Type | Description |
---|---|
string | The decrypted content |

encrypt(
string $value
)
:
string
Defined by Zend_Filter_Interface
Encrypts $value with the defined settings
Name | Type | Description |
---|---|---|
$value | string | The content to encrypt |
Type | Description |
---|---|
string | The encrypted content |

setCompression(
string|array $compression
)
:
\Zend_Filter_Encrypt_Mcrypt
Sets a internal compression for values to encrypt
Name | Type | Description |
---|---|---|
$compression | string|array |
Type | Description |
---|---|
\Zend_Filter_Encrypt_Mcrypt |

setEncryption(
string|array $options
)
:
\Zend_Filter_File_Encryption
Sets new encryption options
Name | Type | Description |
---|---|---|
$options | string|array | Encryption options |
Type | Description |
---|---|
\Zend_Filter_File_Encryption |

setVector(
string $vector
=
null
)
:
\Zend_Filter_Encrypt_Mcrypt
Sets the initialization vector
Name | Type | Description |
---|---|---|
$vector | string | (Optional) Vector to set |
Type | Description |
---|---|
\Zend_Filter_Encrypt_Mcrypt |