I am having trouble converting this:
"333"
Into this:
"XjFVd0052XxfnhfBCMKz4EhaQ64069GW9hpvi/cy73GknlcQWUz8c5HbEU7fmfXaPtlu8dbKXlmOhfkb1B5+6w=="
It is for a web based program (I need to get a signature for authentication) and using online converters to check if what I am doing is right, I have managed to successfully convert "333" both into SHA512 and Base64 in Mathematica.
(* String to SHA512 *)
In[1]= IntegerString[
Hash["333", "SHA512"],
16
]
Out[1]= 5e3155774d39d97c5f9e17c108c2b3e0485a43ae34ebd196f61a6f8bf732ef71a49e5710594cfc7391db114edf99f5da3ed96ef1d6ca5e598e85f91bd41e7eeb
(* verified correct using http://www.unit-conversion.info/texttools/sha/#data *)
(* String to Base64 *)
In[2]= ExportString[
"333",
"Base64"
]
Out[2]= MzMz
(* verified correct using http://www.unit-conversion.info/texttools/base64/#data *)
But when I combine the two, I get this:
(* String to SHA512 Base64 *)
In[3]= ExportString[
IntegerString[Hash["333", "SHA512"], 16],
"Base64"
]
Out[3]= NWUzMTU1Nzc0ZDM5ZDk3YzVmOWUxN2MxMDhjMmIzZTA0ODVhNDNhZTM0ZWJkMTk2ZjYxYTZmOGJmNzMyZWY3MWE0OWU1NzEwNTk0Y2ZjNzM5MWRiMTE0ZWRmOTlmNWRhM2VkOTZlZjFkNmNhNWU1OThlODVmOTFiZDQxZTdlZWI=
Instead of:
"XjFVd0052XxfnhfBCMKz4EhaQ64069GW9hpvi/cy73GknlcQWUz8c5HbEU7fmfXaPtlu8dbKXlmOhfkb1B5+6w=="
>_<.
Any ideas on how this could be done?
PS: I found a function for Mathematica 11.2 called "SecuredAuthenticationKey" that could be related to what I am trying to do. I am currently using Mathematica 9.