totp-words
v1.0.2
Published
TOTP but with PGP word list
Downloads
10
Readme
totp-words
TOTP but with PGP word list. Inspired by base256
Installation
npm i totp-words
Idea
This project provides a similar functionality like usual TOTP but with PGP word list.
Usage
import { encode, verify } from 'totp-words';
Default time interval is 30 seconds.
const secretKey = "my-awesome-secret";
const words = encode(secretKey)
const isValid = verify(words, secretKey)
Custom time interval can be used:
const secretKey = "my-awesome-secret";
const options = new TOTPOptions(60)
// or
const options = {
timeInterval: 60
};
const words = encode(secretKey, options)
const isValid = verify(words, secretKey, options)
This project is MIT Licensed.