I’m working through the Creating a Signature Doc here:
I’ve taken the signature base string, and the signing key, in the example, and passed it to the hash_hmac function, as recommended in the doc:
View 6hdU2y - Online PHP Interpreter & Debugging Tool - Ideone.com to see that I can get the correct binary from the hash_hmac function.
Now, to convert it to base64, I believe that I can use PHP’s base64_encode() function. But this gives me an incorrect value:
YjY3OWMwYWYxOGY0ZTljNTg3YWI4ZTIwMGFjZDRlNDhhOTNmOGNiNg==
View Bu0CZi - Online PHP Interpreter & Debugging Tool - Ideone.com to see the function in action.
What am I doing wrong? Note, that I’ve also tried to convert to uppercase and include spaces before the base64_encode() function.