in reply to Problems with HMAC SHA-256

Quoting Digest::SHA:

sha256_hex($data, ...)
Logically joins the arguments into a single string, and returns its SHA-1/224/256/384/512 digest encoded as a hexadecimal string.
$ { echo -n 138539083512345apiKeyDEMO ; echo -n apiSecretDEMO; } | sha +256sum ea645ae07e04289f3fe14c81af54f7da9cae1114fe2bb9efbb6b383ef276434b -