Method |
Description |
|
base32_decode ( $b32 ) |
Decodes a base32 string into a binary string. |
|
generate_secret_key ( $length = 16 ) : string |
Generates a 16 digit secret key in base32 format |
|
get_qr_code ( $username, $secret ) |
|
|
get_qr_code_url ( $username, $secret ) |
|
|
get_timestamp ( ) : integer |
Returns the current Unix Timestamp devided by the KEYREGENERATION
period. |
|
oath_hotp ( binary $key, integer $counter ) : string |
Takes the secret key and the timestamp and returns the one time
password. |
|
oath_truncate ( binary $hash ) : integer |
Extracts the OTP from the SHA1 hash. |
|
verify_key ( string $b32seed, string $key, integer $window = 4, boolean $useTimeStamp = true ) : boolean |
Verifys a user inputted key against the current timestamp. Checks $window
keys either side of the timestamp. |
|