I need the base64-decoded key on the prehash string for an API JWT signing.
The calculation I used is: HexDecode ( API_Key_Private )
The API_Key_Private field is a text field containing a crypto keys that for example begin with: bb92eca45ba7d3511...
The result a Text field: ?
1) Has the calculation simply succeeded and I should proceed? My next step would be to sign using CryptDecryptBase64
2) Should I be using a Text result calculation?
3) Judging the the key is it data that has be Base64 encoded, that can be decoded?
4) Can I used Base64Decode on a $variable?
5) Given the type of keys I am using, do I need to use HexDecoded or Base64Decoded or use them as is, keys in CryptAuthCode for the key value?
6) Why does the HexDecode $Key have fileNameWithExtension of "key.data" in the Example below? Why not just HexDecode ( $Key )
Returns an HMAC of the contents of the $JSON variable using the SHA512 algorithm and a hex-encoded key $Key. The container data returned by CryptAuthCode is returned as Base64-encoded text.
Base64EncodeRFC ( 4648; CryptAuthCode ( $JSON ; "SHA512" ; HexDecode ( $Key ; "key.data" ) ) )