Skip to content

Commit

Permalink
Increase bcrypt rounds to 12 (#48494)
Browse files Browse the repository at this point in the history
  • Loading branch information
valorin authored Sep 22, 2023
1 parent 165252b commit 1b88b16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Hashing/BcryptHasher.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class BcryptHasher extends AbstractHasher implements HasherContract
*
* @var int
*/
protected $rounds = 10;
protected $rounds = 12;

/**
* Indicates whether to perform an algorithm check.
Expand Down
1 change: 1 addition & 0 deletions tests/Hashing/HasherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function testBasicBcryptHashing()
$this->assertFalse($hasher->needsRehash($value));
$this->assertTrue($hasher->needsRehash($value, ['rounds' => 1]));
$this->assertSame('bcrypt', password_get_info($value)['algoName']);
$this->assertGreaterThanOrEqual(12, password_get_info($value)['options']['cost']);
$this->assertTrue($this->hashManager->isHashed($value));
}

Expand Down

0 comments on commit 1b88b16

Please sign in to comment.