1.4.0 • Published 11 months ago

@inanna/pw v1.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

Usage

import {PBKDF2, PW} from '@inanna/pw'
// or import {Scrypt, PW} from '@inanna/pw'

// Create KDF

const kdf = new PBKDF2({pwlen: 6});

// Create and encrypt password

const pw = await kdf.pw('123456');

// Check password

console.log(await pw.check('123456')); // return true
console.log(await pw.check('foo')); // return false

// Export password

const jsonPW = JSON.stringify(pw);

// Import password

const pw2 = PW.from(jsonPW)

// Import null-password

const nopw = PW.from(null);
console.log(await nopw.check('any password')); // return false
console.log(JSON.stringify(nopw)); // return 'null'

Contents

1.4.0

11 months ago

1.3.2

12 months ago

1.3.1

12 months ago

1.3.0

12 months ago

1.2.2

12 months ago

1.2.1

12 months ago

1.2.0

12 months ago

1.1.0

12 months ago

1.0.0

12 months ago