PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@hashgraph/cryptography/lib/encoding
Просмотр файла: base64.browser.cjs
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.decode = decode;
exports.encode = encode;
/**
* @param {string} text
* @returns {Uint8Array}
*/
function decode(text) {
// note: assumes <atob> is available in the global scope if <Buffer> is not
// eslint-disable-next-line deprecation/deprecation
return Uint8Array.from(atob(text), c => c.charCodeAt(0));
}
/**
* @param {Uint8Array} data
* @returns {string};
*/
function encode(data) {
// note: assumes <btoa> is available in the global scope if <Buffer> is not
// eslint-disable-next-line deprecation/deprecation
return btoa(String.fromCharCode.apply(null, Array.from(data)));
}Выполнить команду
Для локальной разработки. Не используйте в интернете!