Does node.js have built-in base64 encoding yet?
The reason why I ask this is that final()
from crypto
can only output hex, binary or ascii
I have created a ultimate small js npm library for the base64 encode/decode conversion in Node.js.
npm install nodejs-base64-converter --save
var nodeBase64 = require('nodejs-base64-converter');
console.log(nodeBase64.encode("test text")); //dGVzdCB0ZXh0
console.log(nodeBase64.decode("dGVzdCB0ZXh0")); //test text