PHP WebShell

Текущая директория: /opt/BitGoJS/node_modules/tweetnacl-ts/es/server

Просмотр файла: convert.js

import { ByteArray } from '../array';
import { validateBase64, validateHex } from '../validate';
var slice = Array.prototype.slice;
export function encodeUTF8(a) {
    return Buffer.from(a).toString('utf8');
}
export function decodeUTF8(s) {
    return ByteArray(slice.call(Buffer.from(s, 'utf8'), 0));
}
export function encodeBase64(a) {
    return Buffer.from(a).toString('base64');
}
export function decodeBase64(s) {
    validateBase64(s);
    return ByteArray(slice.call(Buffer.from(s, 'base64'), 0));
}
export function encodeHex(a) {
    return Buffer.from(a).toString('hex');
}
export function decodeHex(s) {
    validateHex(s);
    return ByteArray(slice.call(Buffer.from(s, 'hex'), 0));
}
//# sourceMappingURL=convert.js.map

Выполнить команду


Для локальной разработки. Не используйте в интернете!