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

Latest commit

 

History

History
24 lines (15 loc) · 601 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 601 Bytes

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.