'To Base64' and 'To Hexdump' operations now support ArrayBuffers

This commit is contained in:
n1474335 2017-12-28 15:59:58 +00:00
parent 849d41ee56
commit 75a554e215
4 changed files with 11 additions and 10 deletions

View file

@ -40,13 +40,13 @@ const Base64 = {
/**
* To Base64 operation.
*
* @param {byteArray} input
* @param {ArrayBuffer} input
* @param {Object[]} args
* @returns {string}
*/
runTo: function(input, args) {
const alphabet = args[0] || Base64.ALPHABET;
return Utils.toBase64(input, alphabet);
return Utils.toBase64(new Uint8Array(input), alphabet);
},