Why im getting irrevelant signs as a result while do base 64 decoding?

I was trying to decode a data according to what response say but i got weird signs and characters as a result.

Here is the response:

data: [,…]
0: "AZCgFQaT8kfoxwk1iumcerFhi0S9FovelCZDY/wyEtsRDlz/t2NeeeOwX3j0oFyDTxflQ3n5TJXf1yK9IFcTgoMAERAkAQAAAA=="
1: "base64"

My code:

let data = 'AZCgFQaT8kfoxwk1iumcerFhi0S9FovelCZDY/wyEtsRDlz/t2NeeeOwX3j0oFyDTxflQ3n5TJXf1yK9IFcTgoMAERAkAQAAAA==';
console.log(Buffer.from(data, 'base64').toString())

☺��§♠��G�� 5��z�a�D�▬�ޔ&Cc�2↕�◄♫��c^y�_x���O↨�Cy�L���"� W‼��◄►$☺

I couldn’t figure it out, what am I missing?

Source: JavaSript – Stack Overflow

September 17, 2021
Category : News
Tags: base64 | decode | encode | javascript | node.js

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.