public __construct ( integer $cost ) | ||
$cost | integer |
public function __construct($cost)
{
if ($cost < 4 || $cost > 31) {
throw new \InvalidArgumentException('BCrypt cost must be between 4 and 31.', 1318447710);
}
$this->cost = sprintf('%02d', $cost);
}