Guest User

Untitled

a guest
Jan 16th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. HMAC hasher = new HMACSHA256(Encoding.UTF8.GetBytes("secret")); //key
  2. byte[] data = hasher.ComputeHash(Encoding.UTF8.GetBytes("2012-10-01T17:48:56")); //timestamp
  3. Convert.ToBase64String(data); //computed token
  4.  
  5. $hmac = hash_hmac("sha256", "2012-10-01T17:48:56", "secret");
  6. $hmac = base64_encode($hmac);
  7.  
  8. $hmac = hash_hmac("sha256", "2012-10-01T17:48:56", "secret", true);
  9. $hmac = base64_encode($hmac);
  10.  
  11. NASzFnV3Flw5ppkTIja5/aaFELPNIpfQb+kbsXCAm0Q=
Add Comment
Please, Sign In to add comment