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:
Znote
2016-11-13 05:34:14 +01:00
parent 236eca61c8
commit c3c236e13e
8 changed files with 453 additions and 29 deletions

View File

@@ -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;
}
?>