Just a guess, since you don't say what you expect to get as a result in $step2: Does hmac_sha256_hex($step1, pack("H*",$appkey)) help?
Update:
I am using hmac_sha256_hex as the app key string is in hex.
I believe the general naming convention in many of the Digest::* modules is that the suffix _hex on the function name refers to their return value, and not their arguments.
In reply to Re: HMAC Sha256 Help! (updated)
by haukex
in thread HMAC Sha256 Help!
by ribble
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |