|
|
|
@ -20,7 +20,7 @@ class HMAC_SHA1 implements HashInterface
|
|
|
|
return $this->hash($key, \dechex($val));
|
|
|
|
return $this->hash($key, \dechex($val));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function hashType(): string
|
|
|
|
public static function hashType(): string
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return "SHA1";
|
|
|
|
return "SHA1";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -28,7 +28,7 @@ class HMAC_SHA1 implements HashInterface
|
|
|
|
/** @SuppressWarnings(PHPMD.StaticAccess) */
|
|
|
|
/** @SuppressWarnings(PHPMD.StaticAccess) */
|
|
|
|
public static function keygen(): string
|
|
|
|
public static function keygen(): string
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return Base32::encodeUpper(random_bytes(this.DEFAULT_SECRET_SIZE));
|
|
|
|
return Base32::encodeUpper(random_bytes(this::DEFAULT_SECRET_SIZE));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|