I have the php code to generate hash_hmac
key = base64_encode(hash_hmac('sha1',$public_key, $private_key,TRUE));
I've tried the CryptoJS library to solve it.
According to the documentation:
var public_key = 'msg',
private_key = 'key';
var hash = CryptoJS.HmacSHA1(public_key, private_key)
I don't know how to set the Raw Output to Binary like set $raw_output
to true
in php.
Can anyone help me?
Thanks:)