Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 379 Bytes

README.md

File metadata and controls

12 lines (8 loc) · 379 Bytes

@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