Lines Matching refs:key
103 private $key = false;
208 * Sets the key for HMACs
212 * @param string $key
214 public function setKey($key = false)
216 $this->key = $key;
242 * Pre-compute the key used by the HMAC
245 * will first hash the key using H and then use the resultant L byte string as the actual key to HMAC."
254 if ($this->key === false) {
259 if (strlen($this->key) <= $this->getBlockLengthInBytes()) {
260 $this->computedKey = $this->key;
265 call_user_func($this->algo, $this->key) :
266 hash($this->algo, $this->key, true);
445 * The key-derivation function generates pseudorandom bits used to key the hash functions.
465 $k = $this->key;
516 // Define total key needed for all iterations using KDF.
517 // L1Key reuses most key material between iterations.
526 // For each iteration, extract key and do three-layer hash.
668 // Extract keys and restrict to special key-sets
788 if (!is_string($this->key)) {
789 throw new InsufficientSetupException('No key has been set');
791 if (strlen($this->key) != 16) {
824 $this->c->setKey($this->key);
836 if (empty($this->key) || !is_string($this->key)) {
842 $key = str_pad($this->computedKey, $b, chr(0));
843 $temp = $this->ipad ^ $key;
846 $output = $this->opad ^ $key;
853 $output = !empty($this->key) || is_string($this->key) ?