function acquia_search_valid_response in Acquia Search 6.3
Same name and namespace in other branches
- 6 acquia_search.module \acquia_search_valid_response()
Validate the authenticity of returned data using a nonce and HMAC-SHA1.
Return value
TRUE or FALSE.
1 call to acquia_search_valid_response()
- AcquiaSearchService::authenticateResponse in ./
Acquia_Search_Service.php - Validate the hmac for the response body.
File
- ./
acquia_search.module, line 422 - Integration between Acquia Drupal and Acquia's hosted solr search service.
Code
function acquia_search_valid_response($hmac, $nonce, $string, $derived_key = NULL, $env_id = NULL) {
if (empty($derived_key)) {
$derived_key = _acquia_search_derived_key($env_id);
}
return $hmac == hash_hmac('sha1', $nonce . $string, $derived_key);
}