This is the code documentation for the SproutCMS project
Search documentation |
class GoogleAuthenticatorVariables
Functions
public checkCodebool $GoogleAuthenticator->checkCode ( string $secret , string $code ); Check a given code against a given secret Does the check three times, for current time, one period before, and one period after This is to allow for clock drift public generateSecretstring $GoogleAuthenticator->generateSecret ( ); Generate a secret key and encode as base32 NOTE: Only cryptographically secure in PHP 7.0 onwards (uses "random_bytes" method) On earlier versions of PHP this method isn't available so rand() is used instead protected getCodestring $GoogleAuthenticator->getCode ( string $secret , int $time ); Calculate what the code for a given secret/time should be public getQRDatastring $GoogleAuthenticator->getQRData ( string $issuer , string $user , string $host , string $secret ); For a given set of details, return the otpauth:// url for use in a QR code public getQRImageUrlstring $GoogleAuthenticator->getQRImageUrl ( string $qr_data ); Return a Google Charts url which generates a QR code image from some QR code data |
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|