pwdr
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

🔣 Pwdr

A utility for generating deterministic passwords using a phrase and key

version license size downloads

📦 Installation

npm i pwdr

🚀 Quickstart

import { generatePwd } from 'pwdr';

const encoder = new TextEncoder();
const phrase = encoder.encode('phrase');
const key = encoder.encode('key');

const pwdBuffer = await generatePwd(phrase, key);
import { generatePwd, erase } from 'pwdr';

const encoder = new TextEncoder();
const decoder = new TextDecoder();
const phrase = encoder.encode('phrase');
const key = encoder.encode('key');
const salt = encoder.encoding('salt');

const pwdBuffer = await generatePwd(phrase, key, { length: 32, iterations: 1_000_000, salt });
const pwd = decoder.decode(pwdBuffer);

erase(phrase, key, salt, pwdBuffer);

🔢 Resulting password

  • Minimum length: 16
  • Maximum length: 64
  • Default length: 32

🔁 Version compatibility check

  • phrase: compatibility_check_phrase
  • key: compatibility_check_key
  • length: 32

🏷️ Versions

  • v1.x.x
    • result: 1e9/wtB["D0NS/oCa/ra9p,v'NHBT4GQ
  • v2.x.x
    • result: Ey,7Lg#4Vp(9Dg^2Nm_3Rm@5Bv!5Zj^8

Readme

Keywords

Package Sidebar

Install

npm i pwdr

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

9.64 kB

Total Files

5

Last publish

Collaborators

  • apollo917