ethers.js/utils/base64.js
2018-04-14 16:10:26 -04:00

14 lines
287 B
JavaScript

'use strict';
var convert = require('./convert');
module.exports = {
decode: function(textData) {
return convert.arrayify(new Buffer(textData, 'base64'));
},
encode: function(data) {
return (new Buffer(convert.arrayify(data))).toString('base64');
}
};