mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-12 18:01:09 +00:00
Merge branch '3.0'
This commit is contained in:
commit
9c73d2d06d
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user