示例#1
0
 public function calculateTsMac($ts, CredentialsInterface $credentials)
 {
     $normalized = 'hawk.' . self::HEADER_VERSION . '.ts' . "\n" . $ts . "\n";
     return base64_encode(hash_hmac($credentials->algorithm(), $normalized, $credentials->key(), true));
 }