Encryption adapter for mcrypt

category Zend
package Zend_Filter
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Class constructor

__construct(string|array|\Zend_Config $options) 

Parameters

$options

stringarray\Zend_Config

Cryption Options

Defined by Zend_Filter_Interface

decrypt(string $value) : string

Decrypts $value with the defined settings

inherited_from \Zend_Filter_Encrypt_Interface::decrypt()

Parameters

$value

string

Content to decrypt

Returns

stringThe decrypted content

Defined by Zend_Filter_Interface

encrypt(string $value) : string

Encrypts $value with the defined settings

inherited_from \Zend_Filter_Encrypt_Interface::encrypt()

Parameters

$value

string

The content to encrypt

Returns

stringThe encrypted content

Returns the compression

getCompression() : array

Returns

array

Returns the set encryption options

getEncryption() : array

Returns

array

Returns the set vector

getVector() : string

Returns

string

Sets a internal compression for values to encrypt

setCompression(string|array $compression) : \Zend_Filter_Encrypt_Mcrypt

Parameters

$compression

stringarray

Returns

\Zend_Filter_Encrypt_Mcrypt

Sets new encryption options

setEncryption(string|array $options) : \Zend_Filter_File_Encryption

Parameters

$options

stringarray

Encryption options

Returns

\Zend_Filter_File_Encryption

Sets the initialization vector

setVector(string $vector = null) : \Zend_Filter_Encrypt_Mcrypt

Parameters

$vector

string

(Optional) Vector to set

Returns

\Zend_Filter_Encrypt_Mcrypt

Returns the adapter name

toString() : string

Returns

string

Close a cipher

_closeCipher(resource $cipher) : \Zend_Filter_Encrypt_Mcrypt

Parameters

$cipher

resource

Cipher to close

Returns

\Zend_Filter_Encrypt_Mcrypt

Initialises the cipher with the set key

_initCipher(resource $cipher) : resource

Parameters

$cipher

resource

Exceptions

Returns

resource

Open a cipher

_openCipher() : resource

Exceptions

\Zend_Filter_Exception When the cipher can not be opened

Returns

resourceReturns the opened cipher

_srand() interception

_srand() 
see

 Properties

 

Internal compression

$_compression : array

Default

 

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 )

$_encryption 

Default

array('key' => 'ZendFramework', 'algorithm' => 'blowfish', 'algorithm_directory' => '', 'mode' => 'cbc', 'mode_directory' => '', 'vector' => null, 'salt' => false)
 

$_srandCalled

$_srandCalled 

Default

false
Static