public function checkHash($error = true) {
		if (!isset($this->request->query[$this->_config['hashField']]) && $error) {
			throw new NotFoundException();
		}

		$result = $this->request->query[$this->_config['hashField']] == $this->getHash();

		if (!$result && $error) {
			throw new NotFoundException();
		}

		return $result;
	}
public function checkHash($error = true) {
		if (!isset($this->request->query[$this->_config['hashField']]) && $error) {
			throw new NotFoundException();
		}

		$result = $this->request->query[$this->_config['hashField']] == $this->getHash();

		if (!$result && $error) {
			throw new NotFoundException();
		}

		return $result;
	}
public function checkHash ( $ error = true ) { if ( ! isset ( $ this -> request -> query [ $ this -> _config [ 'hashField' ] ] ) && $ error ) { throw new NotFoundException ( ) ; } $ result = $ this -> request -> query [ $ this -> _config [ 'hashField' ] ] == $ this -> getHash ( ) ; if ( ! $ result && $ error ) { throw new NotFoundException ( ) ; } return $ result ; }
Compares the hash passed within the named args with the hash calculated based
on the other named args and the imagine salt

This is done to avoid that people can randomly generate tons of images by
just incrementing the width and height for example in the url.

@param bool $error If set to false no 404 page will be rendered if the hash is wrong
@throws NotFoundException if the hash was not present
@return bool True if the hashes match
Compares the hash passed within the named args with the hash calculated based on the other named args and the imagine salt