MediaWiki REL1_33
|
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) | |
static | generateByTime ( $key, $window, $timestamp=false) |
Generate a HOTP key based on a timestamp and window size. | |
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. | |
static | getTime () |
Gets the current time Ensures we are operating in UTC for the entire framework Restores the timezone on exit. | |
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 and(), and 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 and(), 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, and(), array(), 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().