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