McryptCipher
Implements \Joomla\CMS\Crypt\CipherInterfaceCrypt cipher for mcrypt algorithm encryption, decryption and key generation.
since |
3.0.0 |
---|---|
deprecated |
4.0 Without replacement use SodiumCipher |
Methods
__construct
Constructor.
__construct()
since |
3.0.0 |
---|---|
throws |
|
decrypt
Method to decrypt a data string.
decrypt(string $data, \Joomla\CMS\Crypt\Key $key) : string
since |
3.0.0 |
---|---|
throws |
|
Arguments
- $data
string
The encrypted string to decrypt.- $key
\Joomla\CMS\Crypt\Key
The key object to use for decryption.
Response
string
The decrypted data string.
encrypt
Method to encrypt a data string.
encrypt(string $data, \Joomla\CMS\Crypt\Key $key) : string
since |
3.0.0 |
---|---|
throws |
|
Arguments
- $data
string
The data string to encrypt.- $key
\Joomla\CMS\Crypt\Key
The key object to use for encryption.
Response
string
The encrypted data string.
generateKey
Method to generate a new encryption key object.
generateKey(array $options = array()) : \Joomla\CMS\Crypt\Key
since |
3.0.0 |
---|---|
throws |
|
Arguments
- $options
array
Key generation options.
Response
pbkdf2
PBKDF2 Implementation for deriving keys.
pbkdf2(string $p, string $s, integer $kl, integer $c = 10000, string $a = 'sha256') : string
link | |
---|---|
since |
3.0.0 |
Arguments
- $p
string
Password- $s
string
Salt- $kl
integer
Key length- $c
integer
Iteration count- $a
string
Hash algorithm
Response
string
The derived key.
Properties
type
The mcrypt cipher constant.
mode
The mcrypt block cipher mode.
keyType
The Crypt key type for validation.
since |
3.0.0 |
---|
Type(s)
string