]> git.proxmox.com Git - mirror_novnc.git/blob - tests/base64.js
Enable noVNC to become Browserifiable
[mirror_novnc.git] / tests / base64.js
1 // The following results in 'hello [MANGLED]'
2 //
3 // Filed as https://github.com/ry/node/issues/issue/402
4
5 var sys = require("sys"),
6 buf = new Buffer(1024), len,
7 str1 = "aGVsbG8g", // 'hello '
8 str2 = "d29ybGQ=", // 'world'
9
10 len = buf.write(str1, 0, 'base64');
11 len += buf.write(str2, len, 'base64');
12 sys.log("decoded result: " + buf.toString('binary', 0, len));