otpauth
Version:
One Time Password (HOTP/TOTP) library for Node.js, Deno and browsers
10 lines (9 loc) • 389 B
TypeScript
/**
* Calculates an HMAC digest.
* In Node.js, the command "openssl list -digest-algorithms" displays the available digest algorithms.
* @param {string} algorithm Algorithm.
* @param {ArrayBuffer} key Key.
* @param {ArrayBuffer} message Message.
* @returns {ArrayBuffer} Digest.
*/
export function hmacDigest(algorithm: string, key: ArrayBuffer, message: ArrayBuffer): ArrayBuffer;