MediaWiki
master
|
Static Public Member Functions | |
static | hash ( $data, $raw=true) |
Generate a cryptographic hash value (message digest) for a string, making use of the best hash algorithm that we have available. More... | |
static | hashAlgo () |
Decide on the best acceptable hash algorithm we have available for hash() More... | |
static | hashLength ( $raw=true) |
Return the byte-length output of the hash algorithm we are using in self::hash and self::hmac. More... | |
static | hmac ( $data, $key, $raw=true) |
Generate a keyed cryptographic hash value (HMAC) for a string, making use of the best hash algorithm that we have available. More... | |
Static Protected Attributes | |
static string | $algo = null |
The hash algorithm being used. More... | |
static int | $hashLength |
The number of bytes outputted by the hash algorithm. More... | |
Definition at line 26 of file MWCryptHash.php.
|
static |
Generate a cryptographic hash value (message digest) for a string, making use of the best hash algorithm that we have available.
string | $data | |
bool | $raw | True to return binary data, false to return it hex-encoded |
Definition at line 84 of file MWCryptHash.php.
|
static |
Decide on the best acceptable hash algorithm we have available for hash()
Definition at line 41 of file MWCryptHash.php.
References $algo.
|
static |
Return the byte-length output of the hash algorithm we are using in self::hash and self::hmac.
bool | $raw | True to return the length for binary data, false to return for hex-encoded |
Definition at line 68 of file MWCryptHash.php.
References $hashLength.
|
static |
Generate a keyed cryptographic hash value (HMAC) for a string, making use of the best hash algorithm that we have available.
string | $data | |
string | $key | |
bool | $raw | True to return binary data, false to return it hex-encoded |
Definition at line 97 of file MWCryptHash.php.
Referenced by MediaWiki\Block\BlockManager\getCookieValue(), MediaWiki\Block\BlockManager\getIdFromCookieValue(), User\getToken(), and MediaWiki\Session\SessionProvider\hashToSessionId().
|
staticprotected |
The hash algorithm being used.
Definition at line 30 of file MWCryptHash.php.
Referenced by hashAlgo().
|
staticprotected |
The number of bytes outputted by the hash algorithm.
Definition at line 35 of file MWCryptHash.php.
Referenced by hashLength().