MediaWiki REL1_31
|
Static Public Member Functions | |
static | hash ( $data, $raw=true) |
Generate an acceptably unstable one-way-hash of some text making use of the best hash algorithm that we have available. | |
static | hashAlgo () |
Decide on the best acceptable hash algorithm we have available for hash() | |
static | hashLength ( $raw=true) |
Return the byte-length output of the hash algorithm we are using in self::hash and self::hmac. | |
static | hmac ( $data, $key, $raw=true) |
Generate an acceptably unstable one-way-hmac of some text making use of the best hash algorithm that we have available. | |
Static Protected Attributes | |
static | $algo = null |
The hash algorithm being used. | |
static | $hashLength |
The number of bytes outputted by the hash algorithm. | |
Definition at line 26 of file MWCryptHash.php.
|
static |
Generate an acceptably unstable one-way-hash of some text 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 93 of file MWCryptHash.php.
References hash().
Referenced by CryptRand\driftHash(), hash(), CryptRand\randomState(), and MWCryptHashTest\testHash().
|
static |
Decide on the best acceptable hash algorithm we have available for hash()
Definition at line 44 of file MWCryptHash.php.
References $algo.
Referenced by MWCryptHashTest\testHash(), MWCryptHashTest\testHashLength(), and MWCryptHashTest\testHmac().
|
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 76 of file MWCryptHash.php.
Referenced by CryptRand\driftHash(), and MWCryptHashTest\testHashLength().
|
static |
Generate an acceptably unstable one-way-hmac of some text 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 106 of file MWCryptHash.php.
Referenced by CryptRand\generate(), Block\getCookieValue(), Block\getIdFromCookieValue(), User\getToken(), and MWCryptHashTest\testHmac().
|
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.