Crypt is a Joomla Platform class for handling basic encryption/decryption of data.
- Depuis
- 3.0.0
◆ __construct()
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.
- Paramètres
-
- Depuis
- 3.0.0
Références $key.
◆ decrypt()
Method to decrypt a data string.
- Paramètres
-
string | $data | The encrypted string to decrypt. |
- Renvoie
- string The decrypted data string.
- Depuis
- 3.0.0
- Exceptions
-
Références $data.
◆ encrypt()
Method to encrypt a data string.
- Paramètres
-
string | $data | The data string to encrypt. |
- Renvoie
- string The encrypted data string.
- Depuis
- 3.0.0
Références $data.
◆ generateKey()
generateKey |
( |
array |
$options = array() | ) |
|
Method to generate a new encryption key[/pair] object.
- Paramètres
-
array | $options | Key generation options. |
- Renvoie
- Key
- Depuis
- 3.0.0
Références $options.
◆ genRandomBytes()
static genRandomBytes |
( |
|
$length = 16 | ) |
|
|
static |
◆ hasStrongPasswordSupport()
static hasStrongPasswordSupport |
( |
| ) |
|
|
static |
◆ safeStrlen()
static safeStrlen |
( |
|
$str | ) |
|
|
static |
Safely detect a string's length
This method is derived from ::safeStrlen()
- Paramètres
-
string | $str | String to check the length of |
- Renvoie
- integer
- Depuis
- 3.5 mbstring.func_overload
- Exceptions
-
Références null.
◆ safeSubstr()
static safeSubstr |
( |
|
$str, |
|
|
|
$start, |
|
|
|
$length = null |
|
) |
| |
|
static |
Safely extract a substring
This method is derived from ::safeSubstr()
- Paramètres
-
string | $str | The string to extract the substring from |
integer | $start | The starting position to extract from |
integer | $length | The length of the string to return |
- Renvoie
- string
- Depuis
- 3.5
Références $start, et null.
◆ setKey()
Method to set the encryption key[/pair] object.
- Paramètres
-
Key | $key | The key object to set. |
- Renvoie
- Crypt
- Depuis
- 3.0.0
Références $key.
◆ timingSafeCompare()
static timingSafeCompare |
( |
|
$known, |
|
|
|
$unknown |
|
) |
| |
|
static |
A timing safe comparison method.
This defeats hacking attempts that use timing based attack vectors.
NOTE: Length will leak.
- Paramètres
-
string | $known | A known string to check against. |
string | $unknown | An unknown string to check. |
- Renvoie
- boolean True if the two strings are exactly the same.
- Depuis
- 3.2
Référencé par SimpleCryptPassword\verify().
◆ $_cipher
◆ $_key
La documentation de cette classe a été générée à partir du fichier suivant :