API Documentation

Zend/Filter/Encrypt/Openssl.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: Openssl.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Filter_Encrypt_Openssl

Package: Zend\Filter

Encryption adapter for openssl

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  $_keys= 'array( 'public' => array()'

Definitions for encryption array( 'public' => public keys 'private' => private keys 'envelope' => resulting envelope keys )

Default valuearray( 'public' => array()Details
Type
Propertyprotectedboolean  $_package= 'false'

Internal create package

Default valuefalseDetails
Type
boolean
Propertyprotectedstring  $_passphrase= ''

Internal passphrase

Details
Type
string

Methods

methodpublic__construct( string|array $options = array() ) : void

Class constructor Available options 'public' => public key 'private' => private key 'envelope' => envelope key 'passphrase' => passphrase 'compression' => compress value with this compression adapter 'package' => pack envelope keys into encrypted string, simplifies decryption

Parameters
Name Type Description
$options string|array

Options for this adapter

methodprotected_setKeys( string|array $keys ) : \Zend_Filter_Encrypt_Openssl

Sets the encryption keys

Parameters
Name Type Description
$keys string|array

Key with type association

Returns
Type Description
\Zend_Filter_Encrypt_Openssl
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
Throws
Exception Description
\Zend_Filter_Exception
methodpublicencrypt( string $value ) : string

Encrypts $value with the defined settings Note that you also need the "encrypted" keys to be able to decrypt

Parameters
Name Type Description
$value string

Content to encrypt

Returns
Type Description
string The encrypted content
Throws
Exception Description
\Zend_Filter_Exception
methodpublicgetCompression( ) : array

Returns the compression

Returns
Type Description
array
methodpublicgetEnvelopeKey( ) : array

Returns all envelope keys

Returns
Type Description
array
methodpublicgetPackage( ) : boolean

Returns if header should be packaged

Returns
Type Description
boolean
methodpublicgetPassphrase( ) : string

Returns the passphrase

Returns
Type Description
string
methodpublicgetPrivateKey( ) : array

Returns all private keys

Returns
Type Description
array
methodpublicgetPublicKey( ) : array

Returns all public keys

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

Sets a internal compression for values to encrypt

Parameters
Name Type Description
$compression string|array
Returns
Type Description
\Zend_Filter_Encrypt_Openssl
methodpublicsetEnvelopeKey(  $key ) : \Zend_Filter_Encrypt_Openssl

Sets envelope keys

Parameters
Name Type Description
$key
Returns
Type Description
\Zend_Filter_Encrypt_Openssl
methodpublicsetPackage( boolean $package ) : \Zend_Filter_Encrypt_Openssl

Sets if the envelope keys should be included in the encrypted value

Parameters
Name Type Description
$package boolean
Returns
Type Description
\Zend_Filter_Encrypt_Openssl
methodpublicsetPassphrase( string $passphrase ) : \Zend_Filter_Encrypt_Openssl

Sets a new passphrase

Parameters
Name Type Description
$passphrase string
Returns
Type Description
\Zend_Filter_Encrypt_Openssl
methodpublicsetPrivateKey( string $key, string $passphrase = null ) : \Zend_Filter_Encrypt_Openssl

Sets private keys

Parameters
Name Type Description
$key string

Private key

$passphrase string
Returns
Type Description
\Zend_Filter_Encrypt_Openssl
methodpublicsetPublicKey( string|array $key ) : \Zend_Filter_Encrypt_Openssl

Sets public keys

Parameters
Name Type Description
$key string|array

Public keys

Returns
Type Description
\Zend_Filter_Encrypt_Openssl
methodpublictoString( ) : string

Returns the adapter name

Returns
Type Description
string
Documentation was generated by DocBlox 0.15.1.