I am trying to implement an authentication solution with PHP and Objective-C. Both languages ββcreate their own HMAC-SHA1 encoded strings with the same key and the same secret.
Apparently, they seem to differ in their way of how they do it.
On the Objective-C side, I use OAuthCustomer as a signature class that creates a correctly looking encoded string:
/3n/d4sKN6k3I7nBm1qau59UukU=
On the PHP side, I use the built-in function hash_hmac ('sha1', ...) with base64 encoding, which produces this:
ZmY3OWZmNzc4YjBhMzdhOTM3MjNiOWMxOWI1YTlhYmI5ZjU0YmE0NQ==
Then I tried to use another function (mentioned here ), and this leads to base64 encoding:
NWY1ODUwOWE3NGI4NWU5ZTIxMDYzMTNmNzk3NTYxMDQ4OWE1MmUzNQ==
I have no idea how I can fix this problem, and I donβt even know why this is happening.
,