Skip to content

Commit

Permalink
Using hash_hmac_algos() instead of hash_algos()
Browse files Browse the repository at this point in the history
The variable hashAlgo is used with the hash_hmac function, the list of registered hash algorithms suitable for hash_hmac is obtained with hash_hmac_algos().
  • Loading branch information
jeijei4 authored Sep 10, 2024
1 parent 642ebf7 commit 9e0436b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AntiCSRF.php
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public function reconfigure(array $options = []): self
$this->$opt = $val;
break;
case 'hashAlgo':
if (\in_array($val, \hash_algos(), true)) {
if (\in_array($val, \hash_hmac_algos(), true)) {
$this->hashAlgo = (string) $val;
}
break;
Expand Down

0 comments on commit 9e0436b

Please sign in to comment.