aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/spomky-labs/otphp/src/HOTP.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/spomky-labs/otphp/src/HOTP.php')
-rw-r--r--vendor/spomky-labs/otphp/src/HOTP.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/vendor/spomky-labs/otphp/src/HOTP.php b/vendor/spomky-labs/otphp/src/HOTP.php
index 1588d48aa..835de35f3 100644
--- a/vendor/spomky-labs/otphp/src/HOTP.php
+++ b/vendor/spomky-labs/otphp/src/HOTP.php
@@ -46,6 +46,9 @@ final class HOTP extends OTP implements HOTPInterface
return self::createFromSecret(self::generateSecret());
}
+ /**
+ * @return 0|positive-int
+ */
public function getCounter(): int
{
$value = $this->getParameter('counter');
@@ -63,6 +66,8 @@ final class HOTP extends OTP implements HOTPInterface
/**
* If the counter is not provided, the OTP is verified at the actual counter.
+ *
+ * @param null|0|positive-int $counter
*/
public function verify(string $otp, null|int $counter = null, null|int $window = null): bool
{
@@ -97,9 +102,6 @@ final class HOTP extends OTP implements HOTPInterface
]];
}
- /**
- * @param positive-int $counter
- */
private function updateCounter(int $counter): void
{
$this->setCounter($counter);