Commit 3b8aff5a by MaximAL

Blowfish cost must be in range 4…31, not 4…30

`generateSalt` parameter validation fix.
parent c86d5970
...@@ -262,7 +262,7 @@ class SecurityBase ...@@ -262,7 +262,7 @@ class SecurityBase
protected static function generateSalt($cost = 13) protected static function generateSalt($cost = 13)
{ {
$cost = (int)$cost; $cost = (int)$cost;
if ($cost < 4 || $cost > 30) { if ($cost < 4 || $cost > 31) {
throw new InvalidParamException('Cost must be between 4 and 31.'); throw new InvalidParamException('Cost must be between 4 and 31.');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment