ethers.js/utils/base64.js

14 lines
287 B
JavaScript
Raw Normal View History

'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');
}
};