Filter/Encrypt/Mcrypt.php

Show: PublicProtectedPrivateinherited
Table of Contents
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_Filter
Encryption adapter for mcrypt
Implements
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedarray $_compression
Internal compression
Details
Type
array
>VPropertyprotected$_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
>VPropertyprotected$_srandCalled = false
static
Default valuefalseDetails
Type
n/a

Methods

methodpublic__construct(string | array | \Zend_Config $options) : void

Class constructor

Parameters
NameTypeDescription
$optionsstring | array | \Zend_Config

Cryption Options

methodprotected_closeCipher(resource $cipher) : \Zend_Filter_Encrypt_Mcrypt

Close a cipher

Parameters
NameTypeDescription
$cipherresource

Cipher to close

Returns
TypeDescription
\Zend_Filter_Encrypt_Mcrypt
methodprotected_initCipher(resource $cipher) : resource

Initialises the cipher with the set key

Parameters
NameTypeDescription
$cipherresource
Returns
TypeDescription
resource
Throws
ExceptionDescription
methodprotected_openCipher() : resource

Open a cipher

Returns
TypeDescription
resourceReturns the opened cipher
Throws
ExceptionDescription
\Zend_Filter_ExceptionWhen the cipher can not be opened
methodprotected_srand() : void

_srand() interception

Details
See
 
methodpublicdecrypt(string $value) : string

Defined by Zend_Filter_Interface

Decrypts $value with the defined settings
Parameters
NameTypeDescription
$valuestring

Content to decrypt

Returns
TypeDescription
stringThe decrypted content
methodpublicencrypt(string $value) : string

Defined by Zend_Filter_Interface

Encrypts $value with the defined settings
Parameters
NameTypeDescription
$valuestring

The content to encrypt

Returns
TypeDescription
stringThe encrypted content
methodpublicgetCompression() : array

Returns the compression

Returns
TypeDescription
array
methodpublicgetEncryption() : array

Returns the set encryption options

Returns
TypeDescription
array
methodpublicgetVector() : string

Returns the set vector

Returns
TypeDescription
string
methodpublicsetCompression(string | array $compression) : \Zend_Filter_Encrypt_Mcrypt

Sets a internal compression for values to encrypt

Parameters
NameTypeDescription
$compressionstring | array
Returns
TypeDescription
\Zend_Filter_Encrypt_Mcrypt
methodpublicsetEncryption(string | array $options) : \Zend_Filter_File_Encryption

Sets new encryption options

Parameters
NameTypeDescription
$optionsstring | array

Encryption options

Returns
TypeDescription
\Zend_Filter_File_Encryption
methodpublicsetVector(string $vector = null) : \Zend_Filter_Encrypt_Mcrypt

Sets the initialization vector

Parameters
NameTypeDescription
$vectorstring

(Optional) Vector to set

Returns
TypeDescription
\Zend_Filter_Encrypt_Mcrypt
methodpublictoString() : string

Returns the adapter name

Returns
TypeDescription
string
Documentation was generated by phpDocumentor 2.2.0 .