Lines Matching defs:length

82      * Byte-length of hash output (Internal HMAC)
87 private $length;
210 * Keys can be of any length.
224 * Keys can be of any length.
238 throw new \LengthException('The nonce length must be between 1 and 16 bytes, inclusive');
295 $this->length = abs(substr($hash, -3)) >> 3;
308 $this->length = 12; // 96 / 8 = 12
312 $this->length = 16;
315 $this->length = 20;
320 $this->length = 28;
328 $this->length = 32;
332 $this->length = 48;
336 $this->length = 64;
342 $this->length = $matches[2] >> 3;
399 'length' => $this->length,
449 * @return string string of length numbytes bytes
461 * @return string string of length taglen bytes.
467 $taglen = $this->length;
504 * @param string $m string of length less than 2^67 bits.
506 * @return string string of length taglen bytes.
552 * @param string $k string of length 1024 bytes.
553 * @param string $m string of length less than 2^67 bits.
554 * @return string string of length (8 * ceil(bitlength(M)/8192)) bytes.
565 // and add bit-length. Use results to build Y.
567 $length = new BigInteger(1024 * 8);
571 $y .= static::nh($k, $m[$i], $length);
576 // NH hash and add bit-length. Concatenate the result to Y.
578 $length = count($m) ? strlen($m[$i]) : 0;
579 $pad = 32 - ($length % 32);
580 $pad = max(32, $length + $pad % 32);
584 $y .= static::nh($k, $m[$i], new BigInteger($length * 8));
592 * @param string $k string of length 1024 bytes.
593 * @param string $m string with length divisible by 32 bytes.
594 * @return string string of length 8 bytes.
596 private static function nh($k, $m, $length)
647 return $y->add($length)->toBytes();
657 * needed only if the message length is greater than 16 megabytes.)
661 * @param string $k string of length 24 bytes.
662 * @param string $m string of length less than 2^64 bytes.
663 * @return string string of length 16 bytes.
685 $length = strlen($m_2);
686 $pad = 16 - ($length % 16);
688 $m_2 = str_pad($m_2, $length + $pad, "\0"); // zeropad
703 * @param string $m string with length divisible by (wordbits / 8) bytes.
725 // Break M into chunks of length wordbytes bytes
751 * hashes the 16-byte string to a fixed length of 4 bytes.
753 * @param string $k1 string of length 64 bytes.
754 * @param string $k2 string of length 4 bytes.
755 * @param string $m string of length 16 bytes.
756 * @return string string of length 4 bytes.
831 $hashedmessage = $this->uhash($text, $this->length);
837 return substr($algo($text, ...array_values($this->parameters)), 0, $this->length);
845 $temp = substr($algo($temp, ...array_values($this->parameters)), 0, $this->length);
850 return substr($output, 0, $this->length);
857 return strlen($output) > $this->length
858 ? substr($output, 0, $this->length)
863 * Returns the hash length (in bits)
869 return $this->length << 3;
873 * Returns the hash length (in bytes)
879 return $this->length;
883 * Returns the block length (in bits)
893 * Returns the block length (in bytes)
1333 $length = strlen($m);
1334 // to round to nearest 112 mod 128, we'll add 128 - (length + (128 - 112)) % 128
1335 $m .= str_repeat(chr(0), 128 - (($length + 16) & 0x7F));
1336 $m[$length] = chr(0x80);
1338 $m .= pack('N4', 0, 0, 0, $length << 3);