public function setCost($cost)
    {
        if ($cost < 4 || $cost > 31) {
            throw new \InvalidArgumentException(sprintf("Invalid bcrypt cost parameter specified: %s", $cost));
        }
        $this->cost = $cost;
        return $this;
    }