public function checkPassword($password, $hash)
    {
        if ($this->mode == self::MODE_BCRYPT) {
            return $this->checkModeBcrypt($password, $hash);
        } elseif ($this->mode == self::MODE_PBKDF2) {
            return $this->checkModePbkdf2($password, $hash);
        }

        $this->error = 'You have to set the mode...';
        $this->cwsDebug->error($this->error);

        return false;
    }
public function checkPassword($password, $hash)
    {
        if ($this->mode == self::MODE_BCRYPT) {
            return $this->checkModeBcrypt($password, $hash);
        } elseif ($this->mode == self::MODE_PBKDF2) {
            return $this->checkModePbkdf2($password, $hash);
        }

        $this->error = 'You have to set the mode...';
        $this->cwsDebug->error($this->error);

        return false;
    }
public function checkPassword ( $ password , $ hash ) { if ( $ this -> mode == self :: MODE_BCRYPT ) { return $ this -> checkModeBcrypt ( $ password , $ hash ) ; } elseif ( $ this -> mode == self :: MODE_PBKDF2 ) { return $ this -> checkModePbkdf2 ( $ password , $ hash ) ; } $ this -> error = 'You have to set the mode...' ; $ this -> cwsDebug -> error ( $ this -> error ) ; return false ; }
Check a hash with the password given.

@param string $password : The password
@param string $hash     : The stored password hash

@return bool
Check a hash with the password given .