UNPKG

@fruitsjs/util

Version:

Useful utilities and tools for building Fruits Eco-Blockchain applications

14 lines (12 loc) 537 B
import {convertStringToByteArray} from './convertStringToByteArray'; import {convertByteArrayToHexString} from './convertByteArrayToHexString'; /** * Converts/Encode a String into Hexadecimally encoded * Inverse function [[convertHexStringToString]] * @param str The Hex string to be converted * @return {string} The Hex String representing the input string * @module util */ export const convertStringToHexString = (str: string): string => { return convertByteArrayToHexString(convertStringToByteArray(str)); };