Skip to content

bfis/crypt3-passwd

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRYPT(3) for node.js

A nodejs CRYPT(3) N-API module for password encrypt and verify.

Installation

$ npm install crypt3-passwd

Usage

encrypt(password: String, salt: String, algo: String)

  • password (required)
  • salt (optional): if missing, will auto create random salt
  • algo (optional): 'md5'|'sha256'|'sha512'(default)

verify(password: String, hashed: String)

const crypt3 = require('crypt3-passwd')

crypt3.encrypt('jimmy', 'salt', 'sha512') // '$6$salt$n6uyPG4ghvr5KGSCwnvMIoR7415LScAxExYuSwntPu3nzYunXfOyoxGjztZipEmt72wJaBwALWuV24MscmUBe1'
crypt3.verify('jimmy', '$6$salt$n6uyPG4ghvr5KGSCwnvMIoR7415LScAxExYuSwntPu3nzYunXfOyoxGjztZipEmt72wJaBwALWuV24MscmUBe1') // true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 77.1%
  • C 17.8%
  • Python 5.1%