API Documentation

Zend/Filter/Encrypt/Mcrypt.php

Show: inherited
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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Filter  
Version
$Id: Mcrypt.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Filter_Encrypt_Mcrypt

Package: Zend\Filter

Encryption adapter for mcrypt

Implements
\Zend_Filter_Encrypt_Interface
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedarray  $_compression= ''

Internal compression

Details
Type
array
Propertyprotected  $_encryption= 'array( 'key' => 'ZendFramework''

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'Details
Type
Propertyprotected  $_srandCalled= 'false'
static
Default valuefalseDetails
Type

Methods

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

Class constructor

Parameters
Name Type Description
$options string|array|\Zend_Config

Cryption Options

methodprotected_closeCipher( resource $cipher ) : \Zend_Filter_Encrypt_Mcrypt

Close a cipher

Parameters
Name Type Description
$cipher resource

Cipher to close

Returns
Type Description
\Zend_Filter_Encrypt_Mcrypt
methodprotected_initCipher( resource $cipher ) : resource

Initialises the cipher with the set key

Parameters
Name Type Description
$cipher resource
Returns
Type Description
resource
Throws
Exception Description
methodprotected_openCipher( ) : resource

Open a cipher

Returns
Type Description
resource Returns the opened cipher
Throws
Exception Description
\Zend_Filter_Exception When the cipher can not be opened
methodprotected_srand( ) : void

_srand() interception

Details
See
\ZF-8742  
methodpublicdecrypt( 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
methodpublicencrypt( 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
methodpublicgetCompression( ) : array

Returns the compression

Returns
Type Description
array
methodpublicgetEncryption( ) : array

Returns the set encryption options

Returns
Type Description
array
methodpublicgetVector( ) : string

Returns the set vector

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

Sets a internal compression for values to encrypt

Parameters
Name Type Description
$compression string|array
Returns
Type Description
\Zend_Filter_Encrypt_Mcrypt
methodpublicsetEncryption( 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
methodpublicsetVector( string $vector = null ) : \Zend_Filter_Encrypt_Mcrypt

Sets the initialization vector

Parameters
Name Type Description
$vector string

(Optional) Vector to set

Returns
Type Description
\Zend_Filter_Encrypt_Mcrypt
methodpublictoString( ) : string

Returns the adapter name

Returns
Type Description
string
Documentation was generated by DocBlox 0.15.1.