Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.
/ micro-otp Public archive

One Time Password generation via RFC 6238

License

Notifications You must be signed in to change notification settings

paulmillr/micro-otp

Repository files navigation

micro-otp

Warning

The repository has been merged into micro-key-producer. Please head to the new repo for updates.

npm install micro-key-producer

One Time Password generation via RFC 6238.

import * as otp from 'micro-otp';

otp.hotp(otp.parse('ZYTYYE5FOAGW5ML7LRWUL4WTZLNJAMZS'), 0n);
// 549419
otp.totp(otp.parse('ZYTYYE5FOAGW5ML7LRWUL4WTZLNJAMZS'), 0);
// 549419

License

MIT (c) Paul Miller (https://paulmillr.com), see LICENSE file.