final protected function hhmac($string, $api_key_secret) {
    $key = base64_decode($api_key_secret);
    $hashed = hash_hmac('sha256', $string, $key, true);
    $encoded = base64_encode($hashed);
    $signature = rtrim($encoded, "\n");
    return strval($signature);
  }
final protected function hhmac($string, $api_key_secret) {
    $key = base64_decode($api_key_secret);
    $hashed = hash_hmac('sha256', $string, $key, true);
    $encoded = base64_encode($hashed);
    $signature = rtrim($encoded, "\n");
    return strval($signature);
  }
final protected function hhmac ( $ string , $ api_key_secret ) { $ key = base64_decode ( $ api_key_secret ) ; $ hashed = hash_hmac ( 'sha256' , $ string , $ key , true ) ; $ encoded = base64_encode ( $ hashed ) ; $ signature = rtrim ( $ encoded , "\n" ) ; return strval ( $ signature ) ; }
Generate HMAC cryptographic hash.

@param (string) $string Message to be hashed.
@param (string) $api_key_secret Shared secret key used for generating the HMAC.

@return (string) Authorization token used in the HTTP headers.
Generate HMAC cryptographic hash .