public function verifyHash() {
		$this->ensureInput();
		if(empty($this->input['hash']))
			throw new WebHookHandlerException('No hash provided in input payload', WebHookHandlerException::NO_INPUT_HASH);
		
		if($this->input['payloadEncrypted']) {
			if(!$this->payloadJSONString && !$this->getPayload()) return false;
		} else {
			if(!$this->payloadJSONString) $this->payloadJSONString = json_encode($this->input['payload']);
		}
		
		$webHookSalt = substr($this->input['hash'], 0, self::SALT_LENGTH);
		return $this->input['hash'] === $webHookSalt.hash(self::HASH_METHOD, $webHookSalt.$this->secret.$this->payloadJSONString);
	}
public function verifyHash() {
		$this->ensureInput();
		if(empty($this->input['hash']))
			throw new WebHookHandlerException('No hash provided in input payload', WebHookHandlerException::NO_INPUT_HASH);
		
		if($this->input['payloadEncrypted']) {
			if(!$this->payloadJSONString && !$this->getPayload()) return false;
		} else {
			if(!$this->payloadJSONString) $this->payloadJSONString = json_encode($this->input['payload']);
		}
		
		$webHookSalt = substr($this->input['hash'], 0, self::SALT_LENGTH);
		return $this->input['hash'] === $webHookSalt.hash(self::HASH_METHOD, $webHookSalt.$this->secret.$this->payloadJSONString);
	}
public function verifyHash ( ) { $ this -> ensureInput ( ) ; if ( empty ( $ this -> input [ 'hash' ] ) ) throw new WebHookHandlerException ( 'No hash provided in input payload' , WebHookHandlerException :: NO_INPUT_HASH ) ; if ( $ this -> input [ 'payloadEncrypted' ] ) { if ( ! $ this -> payloadJSONString && ! $ this -> getPayload ( ) ) return false ; } else { if ( ! $ this -> payloadJSONString ) $ this -> payloadJSONString = json_encode ( $ this -> input [ 'payload' ] ) ; } $ webHookSalt = substr ( $ this -> input [ 'hash' ] , 0 , self :: SALT_LENGTH ) ; return $ this -> input [ 'hash' ] === $ webHookSalt . hash ( self :: HASH_METHOD , $ webHookSalt . $ this -> secret . $ this -> payloadJSONString ) ; }
Verify the hash passed with the WebHook against the stored secret passed in the constructor

@throws WebHookHandlerException
@return boolean The result of the hash verification
Verify the hash passed with the WebHook against the stored secret passed in the constructor