function _acquia_agent_hmac in Acquia Connector 7
Same name and namespace in other branches
- 6.2 acquia_agent/acquia_agent_streams.inc \_acquia_agent_hmac()
- 6 acquia_agent/acquia_agent_streams.inc \_acquia_agent_hmac()
- 7.3 acquia_agent/acquia_agent.module \_acquia_agent_hmac()
- 7.2 acquia_agent/acquia_agent.module \_acquia_agent_hmac()
Calculates a HMAC-SHA1 according to RFC2104 (http://www.ietf.org/rfc/rfc2104.txt). With addition of xmlrpc params.
4 calls to _acquia_agent_hmac()
- acquia_agent_valid_response in acquia_agent/
acquia_agent.module - Determine if a response from the Acquia Network is valid.
- _acquia_agent_authenticator in acquia_agent/
acquia_agent.module - Creates an authenticator based on xmlrpc params and a HMAC-SHA1.
- _acquia_agent_call_provision_freetrial in acquia_agent/
acquia_agent.pages.inc - Helper function that creates a new AN subscription via xmlrpc call. It stores id/key if success and sets page error otherwise
- _acquia_agent_create_authenticator in acquia_agent/
acquia_agent.pages.inc - Helper function. Creates an authenticator for xmlrpc calls
File
- acquia_agent/
acquia_agent.module, line 592 - Acquia Agent securely sends information to Acquia Network.
Code
function _acquia_agent_hmac($key, $time, $nonce, $params) {
$data = $time . ':' . $nonce . ':' . $key . ':' . serialize($params);
return base64_encode(hash_hmac('sha1', $data, $key, TRUE));
}