@altcmdio/password-utils

1.0.0 • Public • Published

@altcmdio/password-utils

usage

// Make sure you specify "type": "module" in your own package.json
// to be able to use 'import' and 'await' at the top-level.
import * as passwordUtils from '@altcmdio/password-utils'

const passwd = await passwordUtils.generate(16)
// deafult is 16 hex chars
const hash = await passwordUtils.hash(passwd, 10)
// default is 10 salt rounds

console.log(passwd, hash)
console.log(await passwordUtils.compare(passwd, hash))

Readme

Keywords

none

Package Sidebar

Install

npm i @altcmdio/password-utils

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

1.23 kB

Total Files

3

Last publish

Collaborators

  • simondweare