public function needsRehash(string $hash)
    {
        if (substr($hash, 0, 1) !== "$")
            return true;

        $algorithm = $this->config->dget('algorithm', PASSWORD_DEFAULT);
        $options['cost'] = $this->config->dget('cost', 10);
        return password_needs_rehash($hash, $algorithm, $options);
    }
public function needsRehash(string $hash)
    {
        if (substr($hash, 0, 1) !== "$")
            return true;

        $algorithm = $this->config->dget('algorithm', PASSWORD_DEFAULT);
        $options['cost'] = $this->config->dget('cost', 10);
        return password_needs_rehash($hash, $algorithm, $options);
    }
public function needsRehash ( string $ hash ) { if ( substr ( $ hash , 0 , 1 ) !== "$" ) return true ; $ algorithm = $ this -> config -> dget ( 'algorithm' , PASSWORD_DEFAULT ) ; $ options [ 'cost' ] = $ this -> config -> dget ( 'cost' , 10 ) ; return password_needs_rehash ( $ hash , $ algorithm , $ options ) ; }
Check if the password needs a rehash
@param string $hash The hash to check
@return bool True if the password needs to be rehashed, false if not
Check if the password needs a rehash