Method | Description | |
---|---|---|
__construct ( string $label, string | null $secret = null, integer $period = 30, string $digest = 'sha1', integer $digits = 6 ) | TOTP constructor. | |
at ( $timestamp ) | ||
getPeriod ( ) | ||
getProvisioningUri ( ) | ||
now ( ) | ||
verify ( $otp, $timestamp = null, $window = null ) | If no timestamp is provided, the OTP is verified at the actual timestamp {@inheritdoc} |
Method | Description | |
---|---|---|
getTimestamp ( integer | null $timestamp ) : integer | ||
setPeriod ( integer $period ) : self | ||
timecode ( integer $timestamp ) : integer | ||
verifyOtpWithWindow ( string $otp, integer $timestamp, integer $window ) : boolean |
public verify ( $otp, $timestamp = null, $window = null ) |