Update TOTP.php
This commit is contained in:
parent
ddadb1d068
commit
3a118fef15
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ class TOTP {
|
|||
|
||||
public static function timecode(?int $timestamp = null, int $interval = self::INTERVAL): int {
|
||||
$timestamp = $timestamp ?? time();
|
||||
return ($timestamp * 1000) / ($interval * 1000);
|
||||
return (int)(($timestamp * 1000) / ($interval * 1000));
|
||||
}
|
||||
|
||||
public function generate(?int $timestamp = null): string {
|
||||
|
|
Loading…
Reference in a new issue