class SimpleCipher implements CipherInterface

Crypt cipher for Simple encryption, decryption and key generation.

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[/pair] 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

InvalidArgumentException

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

InvalidArgumentException

Key generateKey( array $options = array())

Method to generate a new encryption key[/pair] object.

Parameters

array $options Key generation options.

Return Value

Key