Skip to content

BonnierNews/unixcrypt-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unixcrypt for Node.js - JS version

Build Status

A Node.js module for encrypting and verifying passwords according to the SHA-256 and SHA-512 Crypt standard: https://www.akkadia.org/drepper/SHA-crypt.txt . Based on the TypeScript package unixcrypt.

Dependencies

This package has no external dependencies. It uses the cryptographic facilities built into Node.js.

For development there are dependencies on Chai and Mocha.

Usage

JavaScript

var unixcrypt = require("unixcrypt")

const plaintextPassword = "password"
const pwhash = unixcrypt.encrypt(plaintextPassword)

// verify password with generated hash
console.log(unixcrypt.verify(plaintextPassword, pwHash))
// true

Test

The tests are written with Chai, and Mocha.

$ yarn test

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published