Skip to content

Commit

Permalink
Merge pull request #117 from Mattie112/patch-1
Browse files Browse the repository at this point in the history
Changed default secret length from 80bits to 160bits as recommended by RFC4226
  • Loading branch information
RobThree committed Apr 17, 2024
2 parents b909cb3 + d4a5026 commit dfc1124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/TwoFactorAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(
/**
* 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)
Expand Down

0 comments on commit dfc1124

Please sign in to comment.