Bcrypt::needs_rehash PHP Method

needs_rehash() public method

Check if password is still strong enough
public needs_rehash ( $hash, $cost = self::COST ) : boolean
$hash string
$cost int
return boolean
    function needs_rehash($hash, $cost = self::COST)
    {
        list($pwcost) = sscanf($hash, "\$2y\$%d\$");
        return $pwcost < $cost;
    }