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 = false
static
Default valuefalse
Details- Type
- n/a
Methods
__construct(string | array | \Zend_Config $options) : void
ParametersName | Type | Description |
---|
$options | string | array | \Zend_Config | Cryption Options |
---|
_initCipher(resource $cipher) : resource
Initialises the cipher with the set key
ParametersName | Type | Description |
---|
$cipher | resource | |
---|
ReturnsThrows decrypt(string $value) : string
Defined by Zend_Filter_Interface
Decrypts $value with the defined settings
ParametersName | Type | Description |
---|
$value | string | Content to decrypt |
---|
ReturnsType | Description |
---|
string | The decrypted content |
encrypt(string $value) : string
Defined by Zend_Filter_Interface
Encrypts $value with the defined settings
ParametersName | Type | Description |
---|
$value | string | The content to encrypt |
---|
ReturnsType | Description |
---|
string | The encrypted content |
setCompression(string | array $compression) : \Zend_Filter_Encrypt_Mcrypt
Sets a internal compression for values to encrypt
ParametersName | Type | Description |
---|
$compression | string | array | |
---|
Returns setEncryption(string | array $options) : \Zend_Filter_File_Encryption
Sets new encryption options
ParametersName | Type | Description |
---|
$options | string | array | Encryption options |
---|
Returns setVector(string $vector = null) : \Zend_Filter_Encrypt_Mcrypt
Sets the initialization vector
ParametersName | Type | Description |
---|
$vector | string | (Optional) Vector to set |
---|
Returns