Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (?CipherInterface $cipher=null, ?Key $key=null) | |
decrypt ($data) | |
encrypt ($data) | |
generateKey (array $options=[]) | |
setKey (Key $key) | |
Fonctions membres publiques statiques | |
static | genRandomBytes ($length=16) |
Attributs privés | |
$cipher | |
$key | |
__construct | ( | ?CipherInterface | $cipher = null , |
?Key | $key = null |
||
) |
Object Constructor takes an optional key to be used for encryption/decryption. If no key is given then the secret word from the configuration object is used.
CipherInterface | $cipher | The encryption cipher object. |
Key | $key | The encryption key[/pair)]. |
Références Crypt\$cipher, Crypt\$key, et Crypt\generateKey().
decrypt | ( | $data | ) |
Method to decrypt a data string.
string | $data | The encrypted string to decrypt. |
DecryptionException | if the data cannot be decrypted |
InvalidKeyTypeException | if the key is not valid for the cipher |
UnsupportedCipherException | if the cipher is not supported on the current environment |
Références $data.
encrypt | ( | $data | ) |
Method to encrypt a data string.
string | $data | The data string to encrypt. |
EncryptionException | if the data cannot be encrypted |
InvalidKeyTypeException | if the key is not valid for the cipher |
UnsupportedCipherException | if the cipher is not supported on the current environment |
Références $data.
generateKey | ( | array | $options = [] | ) |
Method to generate a new encryption key[/pair] object.
array | $options | Key generation options. |
InvalidKeyException | if the key cannot be generated |
UnsupportedCipherException | if the cipher is not supported on the current environment |
Références $options.
Référencé par Crypt\__construct().
|
static |
Generate random bytes.
integer | $length | Length of the random data to generate |
Référencé par UserHelper\genRandomPassword(), PlgUserToken\getDefaultProfileFieldValues(), et Path\isOwner().
setKey | ( | Key | $key | ) |
Method to set the encryption key[/pair] object.
Key | $key | The key object to set. |
Références Crypt\$key, et $this.
|
private |
Référencé par Crypt\__construct().
|
private |
Référencé par Crypt\__construct(), et Crypt\setKey().