You are here

function deploy_get_auth_key_hash in Deploy - Content Staging 6

Returns a hash to be used with the key authentication.

@todo Add signed arguments.

Parameters

$key: The API key to be used in the hash.

$timestamp: The timestamp to be used in the hash.

$domain: The domain to be used in the hash.

$nonce: The nonce to be used in the hash.

$method: The method to be used in the hash.

1 call to deploy_get_auth_key_hash()
deploy_auth_key_arguments in ./deploy.module
Implementation of the arguments callback.

File

./deploy.module, line 1045
Deployment API which enables modules to deploy items between servers.

Code

function deploy_get_auth_key_hash($key, $timestamp, $domain, $nonce, $method) {
  $hash_parameters = array(
    $timestamp,
    $domain,
    $nonce,
    $method,
  );
  return hash_hmac('sha256', implode(';', $hash_parameters), $key);
}