UNPKG

otpauth

Version:

One Time Password (HOTP/TOTP) library for Node.js, Deno and browsers

13 lines (12 loc) 390 B
/** * Converts a hexadecimal string to an ArrayBuffer. * @param {string} str Hexadecimal string. * @returns {ArrayBuffer} ArrayBuffer. */ export function hexToBuf(str: string): ArrayBuffer; /** * Converts an ArrayBuffer to a hexadecimal string. * @param {ArrayBuffer} buf ArrayBuffer. * @returns {string} Hexadecimal string. */ export function hexFromBuf(buf: ArrayBuffer): string;