CryptoCipher

Implements \Joomla\Crypt\CipherInterface

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

deprecated
since

3.5

deprecated

5.0 Without replacement use SodiumCipher

package

Application

Methods

decrypt

Method to decrypt a data string.

decrypt(string data, \Joomla\Crypt\Key key) : string
since

3.5

throws

\RuntimeException

Arguments

data

stringThe encrypted string to decrypt.

key

\Joomla\Crypt\KeyThe key object to use for decryption.

Response

stringThe decrypted data string.

encrypt

Method to encrypt a data string.

encrypt(string data, \Joomla\Crypt\Key key) : string
since

3.5

throws

\RuntimeException

Arguments

data

stringThe data string to encrypt.

key

\Joomla\Crypt\KeyThe key object to use for encryption.

Response

stringThe encrypted data string.

generateKey

Method to generate a new encryption key object.

generateKey(array options = array()) : \Joomla\Crypt\Key
since

3.5

throws

\RuntimeException

Arguments

options

arrayKey generation options.

Response

\Joomla\Crypt\Key

isSupported

Check if the cipher is supported in this environment.

isSupported() : bool
static
since

4.0.0

Response

bool