UNPKG

otpauth

Version:

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

8 lines (7 loc) 301 B
/** * Returns true if a is equal to b, without leaking timing information that would allow an attacker to guess one of the values. * @param {string} a String a. * @param {string} b String b. * @returns {boolean} Equality result. */ export function timingSafeEqual(a: string, b: string): boolean;