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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Filter
- Version
- $Id$
\Zend_Filter_Encrypt_Openssl
Package: Zend_FilterEncryption adapter for openssl
- Implements
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
$_keys = array('public' => array(), 'private' => array(), 'envelope' => array())
Definitions for encryption
array(
'public' => public keys
'private' => private keys
'envelope' => resulting envelope keys
)
Default valuearray('public' => array(), 'private' => array(), 'envelope' => array())
Details- Type
- n/a
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
ParametersName | Type | Description |
---|
$options | string | array | Options for this adapter |
---|
_setKeys(string | array $keys) : \Zend_Filter_Encrypt_Openssl
ParametersName | Type | Description |
---|
$keys | string | array | Key with type association |
---|
Returns decrypt(string $value) : string
Defined by Zend_Filter_Interface
Decrypts $value with the defined settings
ParametersName | Type | Description |
---|
$value | string | Content to decrypt |
---|
ReturnsType | Description |
---|
string | The decrypted content |
Throwsencrypt(string $value) : string
Encrypts $value with the defined settings
Note that you also need the "encrypted" keys to be able to decrypt
ParametersName | Type | Description |
---|
$value | string | Content to encrypt |
---|
ReturnsType | Description |
---|
string | The encrypted content |
Throws setCompression(string | array $compression) : \Zend_Filter_Encrypt_Openssl
Sets a internal compression for values to encrypt
ParametersName | 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
ParametersName | Type | Description |
---|
$package | boolean | |
---|
Returns setPrivateKey(string $key, string $passphrase = null) : \Zend_Filter_Encrypt_Openssl
ParametersName | Type | Description |
---|
$key | string | Private key |
---|
$passphrase | string | |
---|
Returns