2.0.0 • Published 2 years ago

scryptwrap v2.0.0

Weekly downloads
10
License
MIT
Repository
github
Last release
2 years ago

scryptwrap

Build Status

A wrapper for the crypto.scrypt(), that can be used as a replacement for argon2 or bcrypt

It does not have any additional dependencies

Minimal required Node version is 10.5.0

Installation

npm i scryptwrap

Usage

Load the module:

import { compare, hash } from 'scryptwrap';

Create a hash:

const hashed = await hash('plaintext');

Compare hash with a plaintext string:

const isValid = await compare(hashed, 'plaintext');
if (isValid) {
  // plaintext string is valid
}

Testing

Deploy the project locally:

git clone https://github.com/julyskies/scryptwrap
cd ./scryptwrap
nvm use 16
npm i

Run tests:

npm run test

Tests are done with Jest

Linting

After deploying the project and installing the modules you can do the linting:

npm run lint

Using ESLint

License

MIT

2.0.0

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago