PHP 클래스 OTPHP\HOTP

상속: extends OTP, implements otphp\HOTPInterface
파일 보기 프로젝트 열기: spomky-labs/otphp 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $label, string | null $secret = null, integer $counter, string $digest = 'sha1', integer $digits = 6 ) HOTP constructor.
getCounter ( )
getProvisioningUri ( )
verify ( $otp, $counter = null, $window = null ) If the counter is not provided, the OTP is verified at the actual counter.

비공개 메소드들

메소드 설명
getWindow ( null | integer $window ) : integer
setCounter ( integer $counter )
updateCounter ( integer $counter )
verifyOtpWithWindow ( string $otp, integer $counter, integer $window ) : boolean

메소드 상세

__construct() 공개 메소드

HOTP constructor.
public __construct ( string $label, string | null $secret = null, integer $counter, string $digest = 'sha1', integer $digits = 6 )
$label string
$secret string | null
$counter integer
$digest string
$digits integer

getCounter() 공개 메소드

public getCounter ( )

getProvisioningUri() 공개 메소드

public getProvisioningUri ( )

verify() 공개 메소드

public verify ( $otp, $counter = null, $window = null )