dpikalov / hotp-totp

Generate One-Time passwords in JS using WebCrypto API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hotp-totp

npm npm license npm downloads

Generate One-Time passwords in JS using WebCrypto

Usage

// Time-based one-time password
await totp('SECRETSECRET')
// HMAC-based one-time password
await hotp('SECRETSECRET', 0 /* counter */) #=> 977742

Installation

  $ npm install hotp-totp

About

Generate One-Time passwords in JS using WebCrypto API

License:MIT License


Languages

Language:JavaScript 100.0%