New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@matters/passphrases

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matters/passphrases

## Introduction

latest
Source
npmnpm
Version
0.0.1-alpha.9
Version published
Weekly downloads
14
366.67%
Maintainers
4
Weekly downloads
 
Created
Source

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

Keywords

passphrases

FAQs

Package last updated on 28 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts