Why HMAC sha256 return different value on PHP & Javascript
问题 I am trying to build a HMAC SHA256 string in Javascript using CryptoJS, my existing code is written in PHP using the Akamai library. In some cases I am getting different results compared to PHP & I am unable to understand why it is giving me different results /* <php> Using native hash_hmac Generating key by concatenating char */ $signature1 = hash_hmac('SHA256', "st=1453362060~exp=1453363260~acl=/*", chr(63)); $signature2 = hash_hmac('SHA256', "st=1453362060~exp=1453363260~acl=/*", chr(63) .