mirror of
https://github.com/RobThree/TwoFactorAuth.git
synced 2026-08-18 09:32:52 +00:00
Changed default secret bits from 80 to 160 as recommended by RFC4226
https://www.ietf.org/rfc/rfc4226.txt (and TOTP refers to RFC4226, see https://www.ietf.org/rfc/rfc6238.txt)
This commit is contained in:
@@ -51,7 +51,7 @@ class TwoFactorAuth
|
||||
/**
|
||||
* Create a new secret
|
||||
*/
|
||||
public function createSecret(int $bits = 80, bool $requirecryptosecure = true): string
|
||||
public function createSecret(int $bits = 160, bool $requirecryptosecure = true): string
|
||||
{
|
||||
$secret = '';
|
||||
$bytes = (int)ceil($bits / 5); // We use 5 bits of each byte (since we have a 32-character 'alphabet' / BASE32)
|
||||
|
||||
Reference in New Issue
Block a user