Generating Base-64 SHA-1 Signature Header for Rackspace API in Apex
This post shares small code snippet to generate base-64 SHA1 Hash, which is typically used in passing as signature header to some APIs. We tested this snippet with Rackspace API Signature Header, which requires a base-64 SHA1 Hash.
The key point to note here is we need to encode the binary hash, not the hex hash, into base-64 and thus the resulting string should be 28 characters long. Here is the gist snippet to generate the hash
Read More: https://abhinav.fyi/generating-base-64-sha-1-signature-header-for-rackspace-api-in-apex/