Skip to content

Instantly share code, notes, and snippets.

@m0freak
Created November 6, 2021 10:35
Show Gist options
  • Save m0freak/99e411980cfb0e069552655830ea1ed2 to your computer and use it in GitHub Desktop.
Save m0freak/99e411980cfb0e069552655830ea1ed2 to your computer and use it in GitHub Desktop.
<?php
//set to the timestamp exactly the same as that provided in the request payload
$data = "2021-11-03T06:17:41.883Z";
//set to the secret that must have been shared between the 2 parties
$secret = "-very-secret-string-";
//sample of the x-auth-token
printf("x-auth-token: %s", base64_encode(hash_hmac('sha512', $data, $secret, true)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment