0.0.1-alpha.9 • Published 9 months ago

@matters/passphrases v0.0.1-alpha.9

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

Passphrases

Introduction

TODO

Usage

npm i @matters/passphrases
import { generate, verify } from '@matters/passphrases'

// load default dict or use your custom dict
import { loadDict, loadIndexDict } from '@matters/passphrases/dict'
const dict = loadDict()
const indexDict = loadIndexDict()

// generate and take the first 6 words as passphrases
const passphrases = generate({
  sigPayload: { email: 'test@example' },
  sigExp: 1693036368286,
  sigSecret: 'abc',
  sigDict: dict,
  expDict: dict,
})

// verify passphrases
const isValid = verify({
  passphrases,
  sigPayload: { email: 'test@example' },
  sigSecret: 'abc',
  sigDict: dict,
  expDict: dict,
  expIndexDict: indexDict,
})

Development

# build
npm run build

# test
npm run test

# build your own dictionary
npm run build:dict

# shuffle the dictionary to make it more secure
npm run shuffle:dict

Benchmark

npm run benchmark
0.0.1-alpha.9

9 months ago

0.0.1-alpha.8

9 months ago

0.0.1-alpha.7

9 months ago

0.0.1-alpha.6

9 months ago

0.0.1-alpha.5

9 months ago

0.0.1-alpha.4

9 months ago

0.0.1-alpha.3

9 months ago

0.0.1-alpha.2

9 months ago

0.0.1-alpha.1

9 months ago

0.0.1-alpha.0

9 months ago