1.0.2 • Published 1 year ago

totp-words v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.0

1 year ago