Revert back to the intended 160 bits

This commit is contained in:
Rob Janssen
2024-04-17 20:43:49 +02:00
parent bb6802c093
commit d4a5026d86
+1 -1
View File
@@ -52,7 +52,7 @@ class TwoFactorAuth
/**
* Create a new secret
*/
public function createSecret(int $bits = 80): string
public function createSecret(int $bits = 160): string
{
$secret = '';
$bytes = (int)ceil($bits / 5); // We use 5 bits of each byte (since we have a 32-character 'alphabet' / BASE32)