Méthode | Description | |
---|---|---|
__construct ( |
Constructor | |
areEqual ( string $str1, string $str2 ) : boolean | Are two strings equal (compared in constant time)? | |
getHmac ( mixed $data, string $algo = 'sha256', string $key = '' ) : Elgg\Security\Hmac | Get an HMAC token builder/validator object | |
getRandomBytes ( integer $length ) : string | Generate a string of highly randomized bytes (over the full 8-bit range). | |
getRandomString ( integer $length, string | null $chars = null ) : string | Generate a random string of specified length. |
Méthode | Description | |
---|---|---|
strlen ( string $binary_string ) : integer | Count the number of bytes in a string |
public __construct ( |
||
$site_secret | Secret service |
public getRandomBytes ( integer $length ) : string | ||
$length | integer | Number of bytes needed |
Résultat | string | Random bytes |