Crypt
Extends CryptCrypt is a Joomla Platform class for handling basic encryption/decryption of data.
since |
3.0.0 |
---|---|
package |
Joomla CMS |
Methods
safeStrlen
Safely detect a string's length
safeStrlen( str) :
static
This method is derived from \ParagonIE\Halite\Util::safeStrlen()
since |
3.5 |
---|---|
ref |
mbstring.func_overload |
throws |
|
Arguments
- str
string
String to check the length of
Response
int
safeSubstr
Safely extract a substring
safeSubstr( str, start, length = null) :
static
This method is derived from \ParagonIE\Halite\Util::safeSubstr()
since |
3.5 |
---|
Arguments
- str
string
The string to extract the substring from- start
int
The starting position to extract from- length
int
The length of the string to return
Response
string
timingSafeCompare
A timing safe comparison method.
timingSafeCompare( known, unknown) :
static
This defeats hacking attempts that use timing based attack vectors.
NOTE: Length will leak.
since |
3.2 |
---|
Arguments
- known
string
A known string to check against.- unknown
string
An unknown string to check.
Response
bool
True if the two strings are exactly the same.