PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/tweetnacl-ts/server
Просмотр файла: convert.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var array_1 = require("../array");
var validate_1 = require("../validate");
var slice = Array.prototype.slice;
function encodeUTF8(a) {
return Buffer.from(a).toString('utf8');
}
exports.encodeUTF8 = encodeUTF8;
function decodeUTF8(s) {
return array_1.ByteArray(slice.call(Buffer.from(s, 'utf8'), 0));
}
exports.decodeUTF8 = decodeUTF8;
function encodeBase64(a) {
return Buffer.from(a).toString('base64');
}
exports.encodeBase64 = encodeBase64;
function decodeBase64(s) {
validate_1.validateBase64(s);
return array_1.ByteArray(slice.call(Buffer.from(s, 'base64'), 0));
}
exports.decodeBase64 = decodeBase64;
function encodeHex(a) {
return Buffer.from(a).toString('hex');
}
exports.encodeHex = encodeHex;
function decodeHex(s) {
validate_1.validateHex(s);
return array_1.ByteArray(slice.call(Buffer.from(s, 'hex'), 0));
}
exports.decodeHex = decodeHex;
//# sourceMappingURL=convert.js.mapВыполнить команду
Для локальной разработки. Не используйте в интернете!