You are here

function _acquia_search_create_derived_key in Acquia Connector 7.2

Same name and namespace in other branches
  1. 7.3 acquia_search/acquia_search.module \_acquia_search_create_derived_key()

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

5 calls to _acquia_search_create_derived_key()
AcquiaSearchUnitTestCase::setUp in acquia_search/tests/acquia_search.test
Overrides DrupalTestCase::setUp().
AcquiaSearchWebTestCase::setUp in acquia_search/tests/acquia_search.test
Overrides DrupalTestCase::setUp().
acquia_search_get_derived_key_for_core in acquia_search/acquia_search.module
Returns derived key for the given core ID.
acquia_search_set_derived_key_for_env in acquia_search/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/acquia_search.module
Get the derived key for the solr hmac using the information shared with acquia.com.

File

acquia_search/acquia_search.module, line 742
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);
}