Lines Matching refs:hash

213      * @param string $hash
216 public function __construct($hash = 'sha256') argument
218 $this->setHash($hash);
283 hash($this->algo, $this->key, true);
303 * @param string $hash
305 public function setHash($hash) argument
307 $this->hashParam = $hash = strtolower($hash);
308 switch ($hash) {
314 $this->length = abs(substr($hash, -3)) >> 3;
326 $hash = substr($hash, 0, -3);
358 if (preg_match('#^(shake(?:128|256))-(\d+)$#', $hash, $matches)) {
360 $hash = $matches[1];
364 "$hash is not a supported algorithm"
369 switch ($hash) {
405 if (in_array(substr($hash, 0, 5), ['sha3-', 'shake', 'kecca'])) {
408 if (version_compare(PHP_VERSION, '7.1.0') < 0 || substr($hash, 0, 5) != 'sha3-') {
421 $hash = ['phpseclib3\Crypt\Hash', PHP_INT_SIZE == 8 ? 'sha3_64' : 'sha3_32'];
425 if ($hash == 'sha512/224' || $hash == 'sha512/256') {
430 $initial = $hash == 'sha512/256' ?
446 $hash = ['phpseclib3\Crypt\Hash', 'sha512'];
450 if (is_array($hash)) {
456 $this->algo = $hash;
800 public function hash($text) function in phpseclib3\\Crypt\\Hash
875 hash($algo, $text, true);
1326 * @param array $hash
1329 private static function sha512($m, $hash) argument
1405 $a = clone $hash[0];
1406 $b = clone $hash[1];
1407 $c = clone $hash[2];
1408 $d = clone $hash[3];
1409 $e = clone $hash[4];
1410 $f = clone $hash[5];
1411 $g = clone $hash[6];
1412 $h = clone $hash[7];
1460 $hash = [
1461 $hash[0]->add($a),
1462 $hash[1]->add($b),
1463 $hash[2]->add($c),
1464 $hash[3]->add($d),
1465 $hash[4]->add($e),
1466 $hash[5]->add($f),
1467 $hash[6]->add($g),
1468 $hash[7]->add($h)
1474 … $temp = $hash[0]->toBytes() . $hash[1]->toBytes() . $hash[2]->toBytes() . $hash[3]->toBytes() .
1475 … $hash[4]->toBytes() . $hash[5]->toBytes() . $hash[6]->toBytes() . $hash[7]->toBytes();