Needing to convert a Base64 string to Hexadecimal with javascript.
Example:
var base64Value = "oAAABTUAAg=="
Need conversion method
Output (Decoded data (hexadecimal)) A0000005350002
A0000005350002
I know this is correct because I can use this website http://tomeko.net/online_tools/base64.php?lang=en
and punch in Base64 string of oAAABTUAAg== and get A0000005350002
oAAABTUAAg==
What have I tried?
https://github.com/carlo/jquery-base64 https://jsfiddle.net/gabrieleromanato/qaght/
I have found a lot of questions
Why not try the following code?:
const buffer = Buffer.from(rawData, 'base64'); const bufString = buffer.toString('hex');
1.4m articles
1.4m replys
5 comments
57.0k users