Error in Signature Creation Documentation


It says here in the last part of the page:

The sample HMAC-SHA1 output is
"B6 79 C0 AF 18 F4 E9 C5 87 AB 8E 20 0A CD 4E 48 A9 3F 8C B6"

And the sample result after base64 encoding the HMAC-SHA1 output is

But then I try to do base64 encoding of
"B6 79 C0 AF 18 F4 E9 C5 87 AB 8E 20 0A CD 4E 48 A9 3F 8C B6"

I get

Based on my experience, base64 encoding a string always makes it longer, not shorter. It seems that the sample signature output in the documentation is incorrect.


Note that the sample signature base string in the documentation is:


and the sample signing key is:

i got this output from the signing function:



echo -n ${SIGNATURE_BASE} | openssl dgst -sha1 -hmac ${SIGNING_KEY} -binary

still not the same as the one in documentation:



$signature = base64_encode(hash_hmac(“sha1”, $sig_url, $key, true)); <- try using that if you are using PHP.