You are here

protected function Client::hash in Acquia Connector 3.x

Same name and namespace in other branches
  1. 8.2 src/Client.php \Drupal\acquia_connector\Client::hash()
  2. 8 src/Client.php \Drupal\acquia_connector\Client::hash()

Calculates a HMAC-SHA1 according to RFC2104.

Parameters

string $key: Key.

int $time: Timestamp.

string $nonce: Nonce.

Return value

string HMAC-SHA1 hash.

See also

http://www.ietf.org/rfc/rfc2104.txt

2 calls to Client::hash()
Client::buildAuthenticator in src/Client.php
Build authenticator to sign requests to the Acquia.
Client::validateResponse in src/Client.php
Validate the response authenticator.

File

src/Client.php, line 401

Class

Client
Acquia connector client.

Namespace

Drupal\acquia_connector

Code

protected function hash($key, $time, $nonce) {
  $string = $time . ':' . $nonce;
  return CryptConnector::acquiaHash($key, $string);
}