PHP 클래스 OTPHP\OTP

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

공개 메소드들

메소드 설명
__construct ( string $label, string | null $secret, string $digest, integer $digits ) OTP constructor.
at ( $input )
getQrCodeUri ( $uri = 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl={PROVISIONING_URI}', $placeholder = '{PROVISIONING_URI}' )

보호된 메소드들

메소드 설명
compareOTP ( string $safe, string $user ) : boolean
filterOptions ( array &$options )
generateOTP ( integer $input ) : string
generateURI ( string $type, array $options ) : string

비공개 메소드들

메소드 설명
getDecodedSecret ( ) : string
intToByteString ( integer $int ) : string

메소드 상세

__construct() 공개 메소드

OTP constructor.
public __construct ( string $label, string | null $secret, string $digest, integer $digits )
$label string
$secret string | null
$digest string
$digits integer

at() 공개 메소드

public at ( $input )

compareOTP() 보호된 메소드

protected compareOTP ( string $safe, string $user ) : boolean
$safe string
$user string
리턴 boolean

filterOptions() 보호된 메소드

protected filterOptions ( array &$options )
$options array

generateOTP() 보호된 메소드

protected generateOTP ( integer $input ) : string
$input integer
리턴 string The OTP at the specified input

generateURI() 보호된 메소드

protected generateURI ( string $type, array $options ) : string
$type string
$options array
리턴 string

getQrCodeUri() 공개 메소드

public getQrCodeUri ( $uri = 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl={PROVISIONING_URI}', $placeholder = '{PROVISIONING_URI}' )