native.js 266 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 'use strict'; // "A little copying is better than a little dependency" - Rob Pike var Enc = module.exports; Enc.bufToBase64 = function(buf) { return Buffer.from(buf).toString('base64'); }; Enc.base64ToBuf = function(b64) { return Buffer.from(b64, 'base64'); };