class CryptoCipher implements CipherInterface

Crypt cipher for encryption, decryption and key generation via the php-encryption library.

Methods

string
decrypt( string $data, Key $key)

Method to decrypt a data string.

string
encrypt( string $data, Key $key)

Method to encrypt a data string.

Key
generateKey( array $options = array())

Method to generate a new encryption key object.

Details

string decrypt( string $data, Key $key)

Method to decrypt a data string.

Parameters

string $data The encrypted string to decrypt.
Key $key The key[/pair] object to use for decryption.

Return Value

string The decrypted data string.

Exceptions

RuntimeException

string encrypt( string $data, Key $key)

Method to encrypt a data string.

Parameters

string $data The data string to encrypt.
Key $key The key[/pair] object to use for encryption.

Return Value

string The encrypted data string.

Exceptions

RuntimeException

Key generateKey( array $options = array())

Method to generate a new encryption key object.

Parameters

array $options Key generation options.

Return Value

Key

Exceptions

RuntimeException