MediaWiki
1.33.1
|
HOTP Class Based on the work of OAuth, and the sample implementation of HMAC OTP http://tools.ietf.org/html/draft-mraihi-oath-hmac-otp-04#appendix-D. More...
Static Public Member Functions | |
static | generateByCounter ( $key, $counter) |
Generate a HOTP key based on a counter value (event based HOTP) More... | |
static | generateByTime ( $key, $window, $timestamp=false) |
Generate a HOTP key based on a timestamp and window size. More... | |
static | generateByTimeWindow ( $key, $window, $min=-1, $max=1, $timestamp=false) |
Generate a HOTP key collection based on a timestamp and window size all keys that could exist between a start and end time will be included in the returned array. More... | |
static | getTime () |
Gets the current time Ensures we are operating in UTC for the entire framework Restores the timezone on exit. More... | |
HOTP Class Based on the work of OAuth, and the sample implementation of HMAC OTP http://tools.ietf.org/html/draft-mraihi-oath-hmac-otp-04#appendix-D.
|
static |
Generate a HOTP key based on a counter value (event based HOTP)
string | $key | the key to use for hashing |
int | $counter | the number of attempts represented in this hashing |
Definition at line 18 of file hotp.php.
References array().
Referenced by generateByTime(), and generateByTimeWindow().
|
static |
Generate a HOTP key based on a timestamp and window size.
string | $key | the key to use for hashing |
int | $window | the size of the window a key is valid for in seconds |
int | bool | $timestamp | a timestamp to calculate for, defaults to time() |
Definition at line 49 of file hotp.php.
References generateByCounter(), and getTime().
|
static |
Generate a HOTP key collection based on a timestamp and window size all keys that could exist between a start and end time will be included in the returned array.
string | $key | the key to use for hashing |
int | $window | the size of the window a key is valid for in seconds |
int | $min | the minimum window to accept before $timestamp |
int | $max | the maximum window to accept after $timestamp |
int | bool | $timestamp | a timestamp to calculate for, defaults to time() |
Definition at line 72 of file hotp.php.
References $out, array(), captcha-old\count, generateByCounter(), and getTime().
Referenced by OATHAuthKey\verifyToken().
|
static |
Gets the current time Ensures we are operating in UTC for the entire framework Restores the timezone on exit.
Definition at line 98 of file hotp.php.
Referenced by generateByTime(), and generateByTimeWindow().