This package has been deprecated

Author message:

This module is deprecated use @frontendmonster/crypto instead

@frontendmonster/password
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

password

useful encryption and jwt utils

Usage

import { hash, compare, uid, decode, sign, verify } from '@frontendmonster/password';

const hashedPassword = await hash(password, salt); // hash password with specific salt
const await compare(userPassword, hasedPassword); // compare hashed passwords
const token = uid(16); // crate 16-len uid
const jwt = sign(payload, secret, option); // sign json web token
const isValid = verify(jwt, tokn); // verify json web token
const payload = decode(jwt); // decode json web token

Readme

Keywords

none

Package Sidebar

Install

npm i @frontendmonster/password

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

7.52 kB

Total Files

12

Last publish

Collaborators

  • frontendmonster