Merge branch '3.0'

This commit is contained in:
terrafrost 2024-08-22 08:48:37 -05:00
commit 9c73d2d06d

View File

@ -280,12 +280,16 @@ class Hash
*/
public function setHash(string $hash): void
{
$oldHash = $this->hashParam;
$this->hashParam = $hash = strtolower($hash);
switch ($hash) {
case 'umac-32':
case 'umac-64':
case 'umac-96':
case 'umac-128':
if ($oldHash != $this->hashParam) {
$this->recomputeAESKey = true;
}
$this->blockSize = 128;
$this->length = abs((int) substr($hash, -3)) >> 3;
$this->algo = 'umac';