[go: up one dir, main page]

Skip to content
/ hotp-js Public

HMAC-Based One-Time Password (HOTP) generation

License

Notifications You must be signed in to change notification settings

v19-io/hotp-js

Repository files navigation

@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