# scrypt-nonce-wrapper

> A wrapper module around crypto.scrypt adding nonce functionality to prevent against rainbow-table attack.

Latest version **1.1.0** (published 2019-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install scrypt-nonce-wrapper
pnpm add scrypt-nonce-wrapper
yarn add scrypt-nonce-wrapper
bun add scrypt-nonce-wrapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-11-22 |
| First published | 2019-10-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.5.0 |
| Dependencies | 0 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | heartnetkung |
| Maintainers | heartnetkung |

## Links

- npm: https://www.npmjs.com/package/scrypt-nonce-wrapper
- Repository: git@github.com:heartnetkung/scrypt-nonce-wrapper
- npm.io page: https://npm.io/package/scrypt-nonce-wrapper

## Recent versions

- 1.1.0 (latest) — 2019-11-22
- 1.0.0 — 2019-10-27

## README

# Scrypt Nonce Wrapper

## Description
A wrapper module around crypto.scrypt adding nonce functionality to prevent against rainbow-table attack.

## Installation
```
yarn add scrypt-nonce-wrapper
```

## Usage
```js
const Scrypt = require("scrypt-nonce-wrapper");
// the rest of config goes into options of this crypto.scrypt
// https://nodejs.org/api/crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback
const scrypt = new Scrypt({salt: 'your salt', keylen: 64});

var password = 'super-password';

// option 1
var hash = scrypt.encryptSync(password);
scrypt.verifyPasswordSync(password, hash); // return true 

// option 2
scrypt.encrypt(password)
	.then((hash)=>{
		return scrypt.verifyPassword(password, hash);
	});
```

## Requirement
- Node version 10.5 or newer

---
_Source: https://npm.io/package/scrypt-nonce-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
