In php I have
base64_encode(hash_hmac('sha512', "GET\n{$uri}", $privateKey));
and to do the same operation in nodejs i have
crypto.createHmac('sha512', privateKey).update('GET' + '\n' + uri).digest('base64');
But the value in both cases doesn't comes out to be same. The length of encoded string in php is much greater than encode string in nodejs. Is there anything implemented wrong in nodejs?
via Rajat Nigam
No comments:
Post a Comment