Class Openssl

Summary

Fully Qualified Name: Zend\Filter\Encrypt\Openssl
Implements: EncryptionAlgorithmInterface

Description

Encryption adapter for openssl

Methods

Name Description Defined By
__construct() 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 Openssl
decrypt() Defined by Zend\Filter\FilterInterface Openssl
encrypt() Encrypts $value with the defined settings Note that you also need the "encrypted" keys to be able to decrypt Openssl
getCompression() Returns the compression Openssl
getEnvelopeKey() Returns all envelope keys Openssl
getPackage() Returns if header should be packaged Openssl
getPassphrase() Returns the passphrase Openssl
getPrivateKey() Returns all private keys Openssl
getPublicKey() Returns all public keys Openssl
setCompression() Sets an internal compression for values to encrypt Openssl
setEnvelopeKey() Sets envelope keys Openssl
setPackage() Sets if the envelope keys should be included in the encrypted value Openssl
setPassphrase() Sets a new passphrase Openssl
setPrivateKey() Sets private keys Openssl
setPublicKey() Sets public keys Openssl
toString() Returns the adapter name Openssl

Method Details

__construct()

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

Parameter Name Type Description
$options string|array|\Traversable Options

Returns:

decrypt()

Defined by Zend\Filter\FilterInterface

Decrypts $value with the defined settings

Parameter Name Type Description
$value string Content

Returns: string The decrypted content

encrypt()

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

Parameter Name Type Description
$value string Content

Returns: string The encrypted content

getCompression()

Returns the compression

Returns: array

getEnvelopeKey()

Returns all envelope keys

Returns: array

getPackage()

Returns if header should be packaged

Returns: bool

getPassphrase()

Returns the passphrase

Returns: string

getPrivateKey()

Returns all private keys

Returns: array

getPublicKey()

Returns all public keys

Returns: array

setCompression()

Sets an internal compression for values to encrypt

Parameter Name Type Description
$compression string|array

Returns: self

setEnvelopeKey()

Sets envelope keys

Parameter Name Type Description
$key string|array Envelope

Returns: self

setPackage()

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

Parameter Name Type Description
$package bool

Returns: self

setPassphrase()

Sets a new passphrase

Parameter Name Type Description
$passphrase string

Returns: self

setPrivateKey()

Sets private keys

Parameter Name Type Description
$key string Private
$passphrase string

Returns: self

setPublicKey()

Sets public keys

Parameter Name Type Description
$key string|array Public

Returns: self

toString()

Returns the adapter name

Returns: string

Top