0.0.1-alpha.9 • Published 3 years ago
@matters/passphrases v0.0.1-alpha.9
Passphrases
Introduction
TODO
Usage
npm i @matters/passphrasesimport { 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:dictBenchmark
npm run benchmark0.0.1-alpha.9
3 years ago
0.0.1-alpha.8
3 years ago
0.0.1-alpha.7
3 years ago
0.0.1-alpha.6
3 years ago
0.0.1-alpha.5
3 years ago
0.0.1-alpha.4
3 years ago
0.0.1-alpha.3
3 years ago
0.0.1-alpha.2
3 years ago
0.0.1-alpha.1
3 years ago
0.0.1-alpha.0
3 years ago