You are here

function _acquia_search_create_derived_key in Acquia Search 6.3

Derive a key for the solr hmac using a salt, id and key.

4 calls to _acquia_search_create_derived_key()
AcquiaSearchUnitTestCase::setUp in tests/acquia_search.test
Overrides DrupalTestCase::setUp().
AcquiaSearchWebTestCase::setUp in tests/acquia_search.test
Overrides DrupalTestCase::setUp().
acquia_search_set_derived_key_for_env in drush/acquia_search.drush.inc
Drush callback Set the derived key for a specific environment, using an id and key. Also set the url to point to the acquia service to make it easier for customers to set any environment as an acquia environment
_acquia_search_derived_key in ./acquia_search.module
Get the derived key for the solr hmac using the information shared with acquia.com.

File

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

Code

function _acquia_search_create_derived_key($salt, $id, $key) {
  $derivation_string = $id . 'solr' . $salt;
  return hash_hmac('sha1', str_pad($derivation_string, 80, $derivation_string), $key);
}