Filter/Encrypt/Openssl.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: Openssl.php 23775 2011-03-01 17:25:24Z ralph $
\Zend_Filter_Encrypt_Openssl
Encryption adapter for openssl
- 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



$_keys= 'array'
Definitions for encryption
array(
'public' => public keys
'private' => private keys
'envelope' => resulting envelope keys
)
Default valuearray
Details
- Type
Methods



__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 |



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 |
Throws



encrypt(
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



setCompression(
string|array $compression
)
:
\Zend_Filter_Encrypt_Openssl
Sets a internal compression for values to encrypt
Parameters
Name |
Type |
Description |
$compression |
string|array |
|
Returns



setPackage(
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