UNPKG

@fruitsjs/util

Version:

Useful utilities and tools for building Fruits Eco-Blockchain applications

13 lines 563 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.convertByteArrayToHexString = void 0; const convertByteArrayToHexString = (bytes, uppercase = false) => { const hex = []; for (let i = 0; i < bytes.length; i++) { hex.push((bytes[i] >>> 4).toString(16)); hex.push((bytes[i] & 0xF).toString(16)); } return uppercase ? hex.join('').toUpperCase() : hex.join(''); }; exports.convertByteArrayToHexString = convertByteArrayToHexString; //# sourceMappingURL=convertByteArrayToHexString.js.map