mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
TFS 1.2+ Two-Factor Authentication system.
RFC6238 Implementation of the OTP algorythm, tested with the app "Authy" from the iOS iPhone app store.
This commit is contained in:
@@ -532,4 +532,14 @@ function logo_exists($guild) {
|
||||
}
|
||||
}
|
||||
|
||||
function generateRandomString($length = 16) {
|
||||
$characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
|
||||
$charactersLength = strlen($characters);
|
||||
$randomString = '';
|
||||
for ($i = 0; $i < $length; $i++) {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
return $randomString;
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user