@v19/hotp
v0.1.0
Published
A simple implementation of the HMAC-Based One-Time Password Algorithm (HOTP) as specified in [RFC 4226](https://datatracker.ietf.org/doc/html/rfc4226).
Downloads
4
Readme
@v19/hotp
A simple implementation of the HMAC-Based One-Time Password Algorithm (HOTP) as specified in RFC 4226.
Usage
import { generateKey, hotp } from "@v19/hotp";
const key = await generateKey(128); // Generate a 128-bit key
const otp = await hotp(key, 0, 6); // Generate a 6-digit OTP for counter 0