From d4a5026d86c9ed49c66a4fde8b86773f848c69c7 Mon Sep 17 00:00:00 2001 From: Rob Janssen Date: Wed, 17 Apr 2024 20:43:49 +0200 Subject: [PATCH] Revert back to the intended 160 bits --- lib/TwoFactorAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TwoFactorAuth.php b/lib/TwoFactorAuth.php index 52d09ab..82b8501 100644 --- a/lib/TwoFactorAuth.php +++ b/lib/TwoFactorAuth.php @@ -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)