Jump to content

Base64 encode data: Difference between revisions

no edit summary
m (→‎{{header|REXX}}: changed the format on what was used for input. -- ~~~~)
No edit summary
Line 68:
return toBase64(stringToArrayUnicode("Nothing seems hard to the people who don't know what they're talking about."))
}())</lang>
 
{{works with|Node.js}}
<lang JavaScript>var http = require('http');
var options = {
host: 'rosettacode.org',
path: '/favicon.ico'
};
callback = function(response) {
var str = '';
response.on('data', function (chunk) {
str += chunk;
});
response.on('end', function () {
console.log(new Buffer(str).toString('base64'));//Base64 encoding right here.
});
}
</lang>
 
=={{header|REXX}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.