export default class Convert { /** * Convert a string (UTF-8 encoded) to a byte array * * @param {String} str UTF-8 encoded string * @return {Uint8Array} Byte array */ static str2bin(str: string): Uint8Array; /** * Convert a byte array to a UTF-8 encoded string * * @param {Uint8Array} arr Byte array * @return {string} UTF-8 encoded string */ static encodeUTF8: (arr: Uint8Array) => string; /** * Convert a UTF-8 encoded string to a byte array * * @param {string} str UTF-8 encoded string * @return {Uint8Array} Byte array */ static decodeUTF8: (str: string) => Uint8Array; /** * Convert Array of 8 bytes (int64) to hex string * * @param {Uint8Array} bin Array of bytes * @return {String} Hex encoded string */ static ab2hex: (buf: ArrayBuffer) => string; /** * Convert hex string to array of 8 bytes (int64) * * @param {String} bin Array of bytes * @return {Uint8Array} Array of 8 bytes (int64) */ static hex2ab: (hex: string) => Uint8Array; /** * Convert a decimal number to hex string * * @param {String} str Decimal to be converted * @param {Number} bytes Length of the output to be padded * @returns Hexadecimal representation of the inputed decimal */ static dec2hex: (str: number | string, bytes: number) => string; static dec2bin: (dec: number) => string; static bytesToHexString: (bytes: number[]) => string; static hexStringToBinary: (hex: string) => string; static binaryToHexString: (bin: string) => string; static stringToHex: (str: string) => string; }