PHP WebShell

Текущая директория: /usr/lib/node_modules/bitgo/node_modules/@iota/bcs/dist/esm

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

function fromHex(hexStr) {
  const normalized = hexStr.startsWith("0x") ? hexStr.slice(2) : hexStr;
  const padded = normalized.length % 2 === 0 ? normalized : `0${normalized}}`;
  const intArr = padded.match(/.{2}/g)?.map((byte) => parseInt(byte, 16)) ?? [];
  return Uint8Array.from(intArr);
}
function toHex(bytes) {
  return bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, "0"), "");
}
const toHEX = toHex;
const fromHEX = fromHex;
export {
  fromHEX,
  fromHex,
  toHEX,
  toHex
};
//# sourceMappingURL=hex.js.map

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


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