Skip to content

Commit aa23a5e

Browse files
authored
Update bcrypt.go
Upgrade Bcrypt DefaultCost from 10 to 12 to match PHP's bcrypt library. See PHP's RFC for research: https://wiki.php.net/rfc/bcrypt_cost_2023
1 parent 0b7aa0c commit aa23a5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bcrypt/bcrypt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
const (
2222
MinCost int = 4 // the minimum allowable cost as passed in to GenerateFromPassword
2323
MaxCost int = 31 // the maximum allowable cost as passed in to GenerateFromPassword
24-
DefaultCost int = 10 // the cost that will actually be set if a cost below MinCost is passed into GenerateFromPassword
24+
DefaultCost int = 12 // the cost that will actually be set if a cost below MinCost is passed into GenerateFromPassword
2525
)
2626

2727
// The error returned from CompareHashAndPassword when a password and hash do

0 commit comments

Comments
 (0)