| [ Index ] |
PHP Cross Reference of MyBB 1.8.39 |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 252 lines (8 kb) |
| Included or required: | 2 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
PHPGangsta_GoogleAuthenticator:: (8 methods):
createSecret()
getCode()
getQRCodeGoogleUrl()
verifyCode()
setCodeLength()
_base32Decode()
_getBase32LookupTable()
timingSafeEquals()
Class: PHPGangsta_GoogleAuthenticator - X-Ref
PHP Class for handling Google Authenticator 2-factor authentication.| createSecret($secretLength = 16) X-Ref |
| Create new secret. 16 characters, randomly chosen from the allowed base32 characters. param: int $secretLength return: string |
| getCode($secret, $timeSlice = null) X-Ref |
| Calculate the code, with given secret and point in time. param: string $secret param: int|null $timeSlice return: string |
| getQRCodeGoogleUrl($name, $secret, $title = null, $params = array() X-Ref |
| Get QR-Code URL for image, from google charts. param: string $name param: string $secret param: string $title param: array $params return: string |
| verifyCode($secret, $code, $discrepancy = 1, $currentTimeSlice = null) X-Ref |
| Check if the code is correct. This will accept codes starting from $discrepancy*30sec ago to $discrepancy*30sec from now. param: string $secret param: string $code param: int $discrepancy This is the allowed time drift in 30 second units (8 means 4 minutes before or after) param: int|null $currentTimeSlice time slice if we want use other that time() return: bool |
| setCodeLength($length) X-Ref |
| Set the code length, should be >=6. param: int $length return: PHPGangsta_GoogleAuthenticator |
| _base32Decode($secret) X-Ref |
| Helper class to decode base32. param: $secret return: bool|string |
| _getBase32LookupTable() X-Ref |
| Get array with all 32 characters for decoding from/encoding to base32. return: array |
| timingSafeEquals($safeString, $userString) X-Ref |
| A timing safe equals comparison more info here: http://blog.ircmaxell.com/2014/11/its-all-about-time.html. param: string $safeString The internal (safe) value to be checked param: string $userString The user submitted (unsafe) value return: bool True if the two strings are identical |
| 2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup | Cross-referenced by PHPXref |