SimpleCipher
Implements \Joomla\CMS\Crypt\CipherInterfaceCrypt cipher for Simple encryption, decryption and key generation.
since |
3.0.0 |
---|---|
deprecated |
4.0 (CMS) |
Methods
_hexToInt
Convert hex to an integer
_hexToInt(string $s, integer $i) : integer
since |
1.7.0 |
---|
Arguments
- $s
string
The hex string to convert.- $i
integer
The offset?
Response
integer
_hexToIntArray
Convert hex to an array of integers
_hexToIntArray(string $hex) : array
since |
1.7.0 |
---|
Arguments
- $hex
string
The hex string to convert to an integer array.
Response
array
An array of integers.
_intToHex
Convert an integer to a hexadecimal string.
_intToHex(integer $i) : string
since |
1.7.0 |
---|
Arguments
- $i
integer
An integer value to convert to a hex string.
Response
string
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[/pair] 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[/pair] object to use for encryption.
Response
string
The encrypted data string.
generateKey
Method to generate a new encryption key[/pair] object.
generateKey(array $options = array()) : \Joomla\CMS\Crypt\Key