You are here

function acquia_search_valid_response in Acquia Search 6

Same name and namespace in other branches
  1. 6.3 acquia_search.module \acquia_search_valid_response()

Validate the authenticity of returned data using a nonce and HMAC-SHA1.

Return value

TRUE or FALSE.

4 calls to acquia_search_valid_response()
AcquiaSearchTest::testHMAC in tests/acquia_search.test
Acquia_Search_Service::makeServletRequest in ./Acquia_Search_Service.php
Make a request to a servlet (a path) that's not a standard path.
Acquia_Search_Service::_sendRawGet in ./Acquia_Search_Service.php
Central method for making a get operation against this Solr Server
Acquia_Search_Service::_sendRawPost in ./Acquia_Search_Service.php
Central method for making a post operation against this Solr Server

File

./acquia_search.module, line 351
Integration between Acquia Drupal and Acquia's hosted solr search service.

Code

function acquia_search_valid_response($hmac, $nonce, $string, $derived_key = NULL) {
  if (empty($derived_key)) {
    $derived_key = _acquia_search_derived_key();
  }
  return $hmac == _acquia_search_hmac($derived_key, $nonce . $string);
}