UNPKG

@li0ard/tsemrtd

Version:

simple library for eMRTD. supports browsers, node, bun and more!

15 lines (14 loc) 489 B
/** * Convert byte array to hex string. * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123' */ export declare const bytesToHex: (bytes: Uint8Array) => string; /** * Convert hex string to byte array. * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23]) */ export declare const hexToBytes: (hex: string) => Uint8Array; /** * Convert byte array to ASCII string. */ export declare const bytesToAscii: (bytes: Uint8Array) => string;