CryptoCipher
Implements CipherInterfaceCrypt cipher for encryption, decryption and key generation via the php-encryption library.
deprecated
since |
3.5 |
---|---|
deprecated |
4.3 will be removed in 6.0 Will be removed without replacement use SodiumCipher instead |
package |
Joomla CMS |
Methods
decrypt
Method to decrypt a data string.
decrypt( data, \Joomla\Crypt\Key key) :
since |
3.5 |
---|---|
throws |
|
Arguments
- data
string
The encrypted string to decrypt.- key
Key
The key object to use for decryption.
Response
string
The decrypted data string.
encrypt
Method to encrypt a data string.
encrypt( data, \Joomla\Crypt\Key key) :
since |
3.5 |
---|---|
throws |
|
Arguments
- data
string
The data string to encrypt.- key
Key
The key object to use for encryption.
Response
string
The encrypted data string.
generateKey
Method to generate a new encryption key object.
generateKey(mixed||string|int options = []) : \Joomla\Crypt\Key
since |
3.5 |
---|---|
throws |
|
Arguments
- options
array<string|int, mixed>
Key generation options.
Response
Key
isSupported
Check if the cipher is supported in this environment.
isSupported() :
static
since |
4.0.0 |
---|
Response
bool