ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($hash='sha1') | |
Default Constructor. More... | |
setKey ($key=false) | |
Sets the key for HMACs. More... | |
getHash () | |
Gets the hash function. More... | |
setHash ($hash) | |
Sets the hash function. More... | |
hash ($text) | |
Compute the HMAC. More... | |
getLength () | |
Returns the hash length (in bytes) More... | |
_md5 ($m) | |
Wrapper for MD5. More... | |
_sha1 ($m) | |
Wrapper for SHA1. More... | |
_md2 ($m) | |
Pure-PHP implementation of MD2. More... | |
_sha256 ($m) | |
Pure-PHP implementation of SHA256. More... | |
_sha512 ($m) | |
Pure-PHP implementation of SHA384 and SHA512. More... | |
_rightRotate ($int, $amt) | |
Right Rotate. More... | |
_rightShift ($int, $amt) | |
Right Shift. More... | |
_not ($int) | |
Not. More... | |
_add () | |
Add. More... | |
_string_shift (&$string, $index=1) | |
String Shift. More... | |
Data Fields | |
const | MODE_INTERNAL = 1 |
#+ private More... | |
const | MODE_MHASH = 2 |
Toggles the mhash() implementation, which has been deprecated on PHP 5.3.0+. More... | |
const | MODE_HASH = 3 |
Toggles the hash() implementation, which works on PHP 5.1.2+. More... | |
$hashParam | |
$b | |
$l = false | |
$hash | |
$key = false | |
$opad | |
$ipad | |
phpseclib\Crypt\Hash::__construct | ( | $hash = 'sha1' | ) |
Default Constructor.
string | $hash |
Definition at line 140 of file Hash.php.
References phpseclib\Crypt\Hash\setHash().
phpseclib\Crypt\Hash::_add | ( | ) |
Add.
_sha256() adds multiple unsigned 32-bit integers. Since PHP doesn't support unsigned integers and since the possibility of overflow exists, care has to be taken. BigInteger could be used but this should be faster.
int | $... |
Definition at line 793 of file Hash.php.
References $result.
Referenced by phpseclib\Crypt\Hash\_sha256().
phpseclib\Crypt\Hash::_md2 | ( | $m | ) |
phpseclib\Crypt\Hash::_md5 | ( | $m | ) |
phpseclib\Crypt\Hash::_not | ( | $int | ) |
Not.
private
int | $int |
Definition at line 777 of file Hash.php.
References $int.
Referenced by phpseclib\Crypt\Hash\_sha256().
phpseclib\Crypt\Hash::_rightRotate | ( | $int, | |
$amt | |||
) |
Right Rotate.
private
int | $int | |
int | $amt |
Definition at line 747 of file Hash.php.
Referenced by phpseclib\Crypt\Hash\_sha256().
phpseclib\Crypt\Hash::_rightShift | ( | $int, | |
$amt | |||
) |
Right Shift.
private
int | $int | |
int | $amt |
Definition at line 763 of file Hash.php.
Referenced by phpseclib\Crypt\Hash\_sha256().
phpseclib\Crypt\Hash::_sha1 | ( | $m | ) |
phpseclib\Crypt\Hash::_sha256 | ( | $m | ) |
Pure-PHP implementation of SHA256.
See SHA-256 (a SHA-2 variant) pseudocode - Wikipedia.
private
string | $m |
Definition at line 458 of file Hash.php.
References phpseclib\Crypt\Hash\$b, $c, $d, $f, $h, phpseclib\Crypt\Hash\$hash, $i, $m, $w, phpseclib\Crypt\Hash\_add(), phpseclib\Crypt\Hash\_not(), phpseclib\Crypt\Hash\_rightRotate(), phpseclib\Crypt\Hash\_rightShift(), and phpseclib\Crypt\Hash\_string_shift().
phpseclib\Crypt\Hash::_sha512 | ( | $m | ) |
Pure-PHP implementation of SHA384 and SHA512.
private
string | $m |
Definition at line 565 of file Hash.php.
References $c, $d, $f, $h, $i, $m, $w, phpseclib\Crypt\Hash\_string_shift(), and add().
phpseclib\Crypt\Hash::_string_shift | ( | & | $string, |
$index = 1 |
|||
) |
String Shift.
Inspired by array_shift
string | $string | |
int | $index |
Definition at line 819 of file Hash.php.
References $index.
Referenced by phpseclib\Crypt\Hash\_sha256(), and phpseclib\Crypt\Hash\_sha512().
phpseclib\Crypt\Hash::getHash | ( | ) |
Gets the hash function.
As set by the constructor or by the setHash() method.
public
Definition at line 179 of file Hash.php.
References phpseclib\Crypt\Hash\$hashParam.
phpseclib\Crypt\Hash::getLength | ( | ) |
Returns the hash length (in bytes)
public
Definition at line 347 of file Hash.php.
References phpseclib\Crypt\Hash\$l.
phpseclib\Crypt\Hash::hash | ( | $text | ) |
Compute the HMAC.
public
string | $text |
Definition at line 298 of file Hash.php.
References phpseclib\Crypt\Hash\$key, Sabre\VObject\$output, and $text.
Referenced by phpseclib\Crypt\Hash\setHash().
phpseclib\Crypt\Hash::setHash | ( | $hash | ) |
Sets the hash function.
public
string | $hash |
Definition at line 190 of file Hash.php.
References phpseclib\Crypt\Hash\$hash, and phpseclib\Crypt\Hash\hash().
Referenced by phpseclib\Crypt\Hash\__construct().
phpseclib\Crypt\Hash::setKey | ( | $key = false | ) |
Sets the key for HMACs.
Keys can be of any length.
public
string | $key |
Definition at line 166 of file Hash.php.
References phpseclib\Crypt\Hash\$key.
phpseclib\Crypt\Hash::$b |
Definition at line 86 of file Hash.php.
Referenced by phpseclib\Crypt\Hash\_sha256().
phpseclib\Crypt\Hash::$hash |
Definition at line 104 of file Hash.php.
Referenced by phpseclib\Crypt\Hash\_sha256(), and phpseclib\Crypt\Hash\setHash().
phpseclib\Crypt\Hash::$hashParam |
Definition at line 77 of file Hash.php.
Referenced by phpseclib\Crypt\Hash\getHash().
phpseclib\Crypt\Hash::$key = false |
Definition at line 113 of file Hash.php.
Referenced by phpseclib\Crypt\Hash\hash(), and phpseclib\Crypt\Hash\setKey().
phpseclib\Crypt\Hash::$l = false |
Definition at line 95 of file Hash.php.
Referenced by phpseclib\Crypt\Hash\getLength().
const phpseclib\Crypt\Hash::MODE_HASH = 3 |
const phpseclib\Crypt\Hash::MODE_INTERNAL = 1 |
#+ private
const phpseclib\Crypt\Hash::MODE_MHASH = 2 |