Filter/Encrypt/Mcrypt.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Filter
- Version
- $Id$
\Zend_Filter_Encrypt_Mcrypt
Package: Zend_FilterEncryption adapter for mcrypt
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties



$_encryption = array('key' => 'ZendFramework', 'algorithm' => 'blowfish', 'algorithm_directory' => '', 'mode' => 'cbc', 'mode_directory' => '', 'vector' => null, 'salt' => false)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
)
Default valuearray('key' => 'ZendFramework', 'algorithm' => 'blowfish', 'algorithm_directory' => '', 'mode' => 'cbc', 'mode_directory' => '', 'vector' => null, 'salt' => false)Details- Type
- n/a



$_srandCalled = falsestatic
Default valuefalseDetails- Type
- n/a
Methods



__construct(string | array | \Zend_Config $options) : voidParameters| Name | Type | Description |
|---|
| $options | string | array | \Zend_Config | Cryption Options |
|---|



_initCipher(resource $cipher) : resourceInitialises the cipher with the set key
Parameters| Name | Type | Description |
|---|
| $cipher | resource | |
|---|
ReturnsThrows 


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



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



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


setEncryption(string | array $options) : \Zend_Filter_File_EncryptionSets new encryption options
Parameters| Name | Type | Description |
|---|
| $options | string | array | Encryption options |
|---|
Returns 


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