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-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Filter
- version
- $Id: Mcrypt.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_Filter_Encrypt_Mcrypt
Encryption adapter for mcrypt
- Implements
- \Zend_Filter_Encrypt_Interface
- category
- Zend
- copyright
- Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
- license
-
New BSD License
- package
- Zend_Filter
Properties



$_encryption= 'array'
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
Details
- Type
Methods



_initCipher(
resource $cipher
)
:
resource
Initialises the cipher with the set key
Parameters
Name |
Type |
Description |
$cipher |
resource |
|
Returns
Type |
Description |
resource |
|
Throws



decrypt(
string $value
)
:
string
Defined 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
)
:
string
Defined 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_Mcrypt
Sets a internal compression for values to encrypt
Parameters
Name |
Type |
Description |
$compression |
string|array |
|
Returns



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



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