JavaScript atob is different than Notepad++ Base64 Decode - javascript

I am receiving the content of a zip file (from an API) as a Base64-encoded string.
If I paste that string into Notepad++ and go
Plugins > MIME Tools > Base64 Decode
and save it as test.zip, it becomes a valid zip file, I can open it.
Now, I am trying to achieve the same thing in JavaScript.
I have tried atob(), and probably everything mentioned in the answers here and the code from Mozilla doc.
atob produces a similar content, but some characters are decoded differently (hence becomes an invalid zip file). The other methods throw an invalid URI error.
How can I reproduce Notepad++ behaviour in JavaScript?

The window.atob is only good for decoding data which fits in a UTF-8 string. Anything which cannot be represented in UTF-8 string will not be equal to its binary form when decoded. Javascript, at most, will try encoding the resultant bytes in to UTF-8 character sequence. This is the reason why your zip archive is rendered invalid eventually.
The moment you do the following:
var data = window.atob(encoded_data)
... you are having a different representation of your data in a UTF-8 string which is referenced by the variable data.
You should decode your binary data directly to an ArrayBuffer. And window.atob is not a good fit for this.
Here is a function which can convert base64 encoded data directly in to an ArrayBuffer.

As mentioned, do not use atob directly for decoding Base64 encoded zip files. You can use this function mentioned in https://stackoverflow.com/a/21797381/3508516 instead.
function _base64ToArrayBuffer(base64) {
var binary_string = window.atob(base64);
var len = binary_string.length;
var bytes = new Uint8Array(len);
for (var i = 0; i < len; i++) {
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
}

Related

Parse UTF-8 XML in javascript

I'm trying to load and parse a simple utf-8-encoded XML file in javascript using node and the xpath and xmldom packages. There are no XML namespaces used and the same XML parsed when converted to ASCII. I can see in the debugger in VS Code that the string has embedded spaces in between each character (surely due to loading the utf-8 file incorrectly) but I can't find a way to properly load and parse the utf-8 file.
Code:
var xpath = require('xpath')
, dom = require('xmldom').DOMParser;
const fs = require('fs');
var myXml = "path_to_my_file.xml";
var xmlContents = fs.readFileSync(myXml, 'utf8').toString();
// this line causes errors parsing every single tag as the tag names have spaces in them from improper utf-8 decoding
var doc = new dom().parseFromString(xmlContents, 'application/xml');
var cvNode = xpath.select1("//MyTag", doc);
console.log(cvNode.textContent);
The code works fine if the file is ASCII (textContent has the proper data), but if it is UTF-8 then there are a number of parsing errors and cvNode is undefined.
Is there a proper way to parse UTF-8 XML in node/javascript? I can't for the life of me find a decent example.
When you see additional white spaces between each letter, this suggests that the file isn't actually encoded using utf-8 but uses a 16 bit unicode encoding.
Try 'utf16le'.
For a list of supported encodings see Buffers and Character Encodings.

base64 encoding in javascript decoding in php

I am trying to encode a string in javascript and decode it in php.
I use this code to put the string in a inputbox and then send it via form PUT.
document.getElementById('signature').value= b64EncodeUnicode(ab2str(signature));
And this code to decode
$signature=base64_decode($signature);
Here there is a jsfiddle for the encoding page:
https://jsfiddle.net/okaea662/
The problem is that I always get a string 98% correct but with some different characters.
For example: (the first string is the string printed in the inputbox)
¦S÷ä½m0×C|u>£áWÅàUù»¥ïs7Dþ1Ji%ýÊ{\ö°(úýýÁñxçO9Ù¡ö}XÇIWçβÆü8ú²ðÑOA¤nì6S+̽ i¼?¼ºNËÒo·a©8»eO|PPþBE=HèÑqaX©$Ì磰©b2(Ðç.$nÈR,ä_OX¾xè¥3éÂòkå¾ N,sáW§ÝáV:ö~Å×à<4)íÇKo¡L¤<Í»äA(!xón#WÙÕGù¾g!)ùC)]Q(*}?­Ìp
¦S÷ ä½m0×C|u>£áWÅàUù»¥ïs7Dþ1Ji%ýÊ{\ö°(úýýÁñxçO9Ù¡ö}XÇIWçβÆü8ú²ðÑOA¤nì6S+̽ i¼?¼ºNËÒo·a©8»eO|PPþBE=HèÑ qaX©$Ì磰©b2(Ðç.$nÈR,ä_OX¾xè¥3éÂòkå¾ N ,sá W§ÝáV:ö~Å×à<4)íÇKo¡L¤<Í»äA(!xón#WÙÕGù¾g!)ùC)]Q(*}?­Ìp
Note that the 4th character is distinct and then there is one or two more somewhere.
The string corresponds to a digital signature so these characters make the signature to be invalid.
I have no idea what is happening here. Any idea? I use Chrome browser and utf-8 encoding in header and metas (Firefox seems to use a different encoding in the inputbox but I will look that problem later)
EDIT:
The encoding to base64 apparently is not the problem. The base64 encoded string is the same in the browser than in the server. If I base64-decode it in javascript I get the original string but if I decode it in PHP I get a slightly different string.
EDIT2:
I still don't know what the problem is but I have avoided it sending the data in a blob with ajax.
Try using this command to encode your string with js:
var signature = document.getElementById('signature');
var base64 = window.btoa(signature);
Now with php, you simply use: base64_decode($signature)
If that doesn't work (I haven't tested it) there may be something wrong with the btoa func. So checkout this link here:
https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
There is a function in there that should work (if the above does not)
function b64EncodeUnicode(str) {
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
return String.fromCharCode('0x' + p1);
}));
}
b64EncodeUnicode(signature); // "4pyTIMOgIGxhIG1vZGU="

Texture2D to byte[] to String

I am having issues in turning Texture2D type image to bytes and then to string. When I do the following:
var myTextureBytes : byte[] = myTexture.EncodeToPNG();
Debug.Log(System.Text.Encoding.UTF8.GetString(myTextureBytes));
I just get a log output of "�PNG". Why is it so short? Whats the question mark? Shouldn't Unity be able to interpret UTF-8 chars? Also when I send that to my NodeJS server it says SyntaxError: Unexpected token and crashes the server.
the problem is that the bytes of PNG representation of the texture is not UTF-8 encoded, which is only for text.
To convert binary data to a string I would recommend base64 encoding.
var myTextureBytes : byte[] = myTexture.EncodeToPNG();
var myTextureBytesEncodedAsBase64 : String = System.Convert.ToBase64String(myTextureBytes);
have you tried using Default encoding?
Debug.Log(System.Text.Encoding.Default.GetString(myTextureBytes));

How to encode 256bit AES key using base64?

I am using NodeJS to interact with Amazon Web Services (specifically s3). I am attempting to use Server side encryption with customer keys. Only AES256 is allowed as an encryption method. The API specifies that the keys be base64 encoded.
At the moment I am merely testing the AWS api, I am using throwaway test files, so security (and secure key generation) are not an issue at the moment.
My problem is as follows: Given that I am in posession of a 256bit hexadecimal string, how do I obtain a base64 encoded string of the integer that that represents?
My first instinct was to first parse the Hexadecimal string as an integer, and convert it to a string using toString(radix) specifying a radix of 64. However toString() accepts a maximum radix of 36. Is there another way of doing this?
And even if I do this, is that a base64 encoded string of 256bit encryption key? The API reference just says that it expects a key that is "appropriate for use with the algorithm specified". (I am using the putObject method).
To convert a hex string to a base64 string in node.js, you can very easily use a Buffer;
var key_in_hex = '11223344556677881122334455667788'
var buf = new Buffer(key_in_hex, 'hex')
var str = buf.toString('base64')
...which will set str to the base64 equivalent of the hex string passed in ('112233...')
You could also of course combine it to a one liner;
var key_in_hex = '11223344556677881122334455667788'
var str = new Buffer(key_in_hex, 'hex').toString('base64')

base64 string gets written as an invalid image using Node.JS

I have the following code:
var __dirname = '/home/ubuntu/Site/public/uploads/';
var base64Data = '/9j/2wBDABAICAgICBAICAgQEBAQECAYEBAQECggIBggMCgwMDAoMDAwOEhAMDhIODAwQFhASFBQUFBQMEBYYFhQYEhQUFD/2wBDARAQEBAQECgYGChQODA4UFBQUFBQUFBQUA==UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUP/AABEIADwAUAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQ==AwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eA==eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAw==BAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWVw==WFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NX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osFy1Nc+SxMTkgnlaYb3PIFMVRK3zGnyWsUZUjPLYOTTsK5G1wzUxydhNQ==NNDHGDtFRFR5LH0xTE2f/9k=';
var buffer = new Buffer(base64Data, 'base64');
fs.writeFileSync(__dirname + 'zorro.jpg', buffer, 0, buffer.length);
However the saved image is corrupt and won't open in Finder. What am I doing wrong? Am I missing some header? The base64 string opens perfectly fine as inline data with an img tag.
EDIT: this works in HTML for me:
<img src="data:image/jpg;base64,/9j/2wBDABAICAgICBAICAgQEBAQECAYEBAQECggIBggMCgwMDAoMDAwOEhAMDhIODAwQFhASFBQUFBQMEBYYFhQYEhQUFD/2wBDARAQEBAQECgYGChQODA4UFBQUFBQUFBQUA==UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUP/AABEIADwAUAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQ==AwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eA==eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAw==BAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWVw==WFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQ==AxEAPwDmraLzIyTzkYINUby+njm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KeZP3aMWHy8c+3+Sfz9aW2G1G5/HH+f
f9ahikzEyA/dPX+X8s0yiCa3iuwcdSf6n/61VjpbjkNkd+P8+9TjfE2QcgH/AD/L9asQXCsNr+n9
Mf0qLk2uURaeWcsvH8Xt/nn8qnt0RucDB/z/AFNaLW8U4+Xnn+v/ANf9aqS2zQsWA6/eGev+fmoH
YfbLHLHiQAsDwD74/wDZiPwBpXRcAx5x/D/T8hg/U1HauXmZF6nt/tf/AK2/SppkJTbGPvfd+nX+
QX86ABVV2Mijj7q+4/8Arnim4+bcT+J/n/n1PpU6wHZtC+2P6fr/AOPU0wlTuJ/H9c/1/E0DFX5V
Pb6/59sfh71nSSPBOWQ/UY/z7fnV92CjAHT1/wA/hVC7+8WFUBOYjjkf54qMwsnI7f5/pUttqFvM
uGYdP6D/AAqyIopDwe/9TUAVYbiSHjP+f8gVeSaK5Uqyg5Pce+P6ioGtfl3D0z+gNRbZYT8p6f8A
1/8ACgCdrICQT28mD79R/j1/X2q9plkb8yvHiNokBEcjdee35AfhVFLkEcn2/n/iKV7tsC4hwSjc
of4lPUfy/M0ATyh4hg8jGAPUf/q4+v0qB5SwLMR/j/n/ANmqeS8jZN5YYI6/1/kfxNZ9zdITiPgU
DCabPGaqyupB5FJLN71VmmJ71SAhjWVT8oNXrO8uoiMgkA1TYlD8pNPjkc8ZpEI011NtuMdsfoRT
m1FWPzJ3/r/9es0uw700s2OtBZee8UYwwHT+n+FNivAQyh+Pf6VnPI2aI5GyeaLBctTXPksTE5IJ
5WmG9zyBTFUSt8xp8lrFGVIzy2Dk07CuRtcM1McnYTU00McYO0VEVHksfTFMTZ//2Q==
As to why the base64 encoded data is working on my end, the RFC4648 for base64 states this:
Furthermore, such specifications MAY ignore the pad character, "=",
treating it as non-alphabet data, if it is present before the end
of the encoded data. If more than the allowed number of pad
characters is found at the end of the string (e.g., a base 64
string terminated with "==="), the excess pad characters MAY also be
ignored.
Some implementation will ignore the added "=" and some will not.
EDIT:
As other has pointed out, your base64 string seems to be many base64 string concatenated together. Here is your string:
/9j/2wBDABAICAgICBAICAgQEBAQECAYEBAQECggIBggMCgwMDAoMDAwOEhAMDhIODAwQFhASFBQUFBQMEBYYFhQYEhQUFD/2wBDARAQEBAQECgYGChQODA4UFBQUFBQUFBQUA==
UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUP/AABEIADwAUAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQ==
AwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eA==
eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAw==
BAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWVw==
WFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29/j5+v/aAAwDAQACEQ==
AxEAPwDmraLzIyTzkYINUby+njmEKtxH1HqeamkvXs7cxoPnPHPas4lyxZsknrUpGjZNJGsn7+2/4EvcUscjKMMKhViDkZqZJJnXaQSPcUwTAznOAKka2cJukxuPY06C3ELedA==
oII+6PepA0074EW0E5x/n8qENu5Hb2zn5RkcGmeQ7zbCCMHmtKKMxuFHPBAPv6/zpJIgX4x+P+f85HpTTFYksFEafLxgdv8AP+fwp5k/doxYfLxz7f5J/P1pbYbUbn8cf59/1g==
oYpMxMgP3T1/l/LNMogmt4rsHHUn+p/+tVY6W45DZHfj/PvU43xNkHIB/wA/y/WrEFwrDa/p/TH9Ki5NrlEWnlnLLx/F7f55/Kp7dEbnAwf8/wBTWi1vFOPl55/r/wDX/Wqktg==
zQsWA6/eGev+fmoHYfbLHLHiQAsDwD74/wDZiPwBpXRcAx5x/D/T8hg/U1HauXmZF6nt/tf/AK2/SppkJTbGPvfd+nX+QX86ABVV2Mijj7q+4/8Arnim4+bcT+J/n/n1PpU6wA==
dm0L7Y/p+v8A49TTCVO4n8f1z/X8TQMVflU9vr/n2x+HvWdJI8E5ZD9Rj/Pt+dX3YKMAdPX/AD+FULv7xYVQE5iOOR/niozCycjt/n+lS22oW8y4Zh0/oP8ACrIiikPB7/1NQA==
FWG4kh4z/n/IFXkmiuVKsoOT3Hvj+oqBrX5dw9M/oDUW2WE/Ken/ANf/AAoAnayAkE9vJg+/Uf49f19qvaZZG/Mrx4jaJARHI3Xnt+QH4VRS5BHJ9v5/4ile7bAuIcEo3KH+JQ==
PUfy/M0ATyh4hg8jGAPUf/q4+v0qB5SwLMR/j/n/ANmqeS8jZN5YYI6/1/kfxNZ9zdITiPgUDCabPGaqyupB5FJLN71VmmJ71SAhjWVT8oNXrO8uoiMgkA1TYlD8pNPjkc8ZpA==
QjTXU224x2x+hFObUVY/Mnf+v/16zS7DvTSzY60Fl57xRjDAdP6f4U2K8BDKH49/pWc8jZojkbJ5osFy1Nc+SxMTkgnlaYb3PIFMVRK3zGnyWsUZUjPLYOTTsK5G1wzUxydhNQ==
NNDHGDtFRFR5LH0xTE2f/9k=
Notice how each of base64 string are 136 chracter long. If you decoded each of these base64 and append the result of each decoded base64 into a file, you will get your image.

Categories