# scryptwrap

> A wrapper for the crypto.scrypt()

Latest version **2.0.0** (published 2022-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install scryptwrap
pnpm add scryptwrap
yarn add scryptwrap
bun add scryptwrap
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-01-17 |
| First published | 2021-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10.5.0 |
| Dependencies | 0 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Peter Dyumin |
| Maintainers | peterdee |
| Keywords | Crypto, Node, Scrypt |

## Links

- npm: https://www.npmjs.com/package/scryptwrap
- Repository: https://github.com/julyskies/scryptwrap
- Issues: https://github.com/julyskies/scryptwrap/issues
- npm.io page: https://npm.io/package/scryptwrap

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-01-17
- 1.0.3 — 2021-05-24
- 1.0.2 — 2021-01-12
- 1.0.1 — 2021-01-12
- 1.0.0 — 2021-01-12

## README

## scryptwrap

[![Build Status](https://travis-ci.com/julyskies/scryptwrap.svg?branch=release)](https://travis-ci.com/julyskies/scryptwrap)

A wrapper for the [`crypto.scrypt()`](https://nodejs.org/dist/latest-v14.x/docs/api/crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback), that can be used as a replacement for [argon2](https://www.npmjs.com/package/argon2) or [bcrypt](https://www.npmjs.com/package/bcrypt)

It does not have any additional dependencies

Minimal required Node version is **10.5.0**

### Installation

```shell script
npm i scryptwrap
```

### Usage

Load the module:

```javascript
import { compare, hash } from 'scryptwrap';
```

Create a hash:

```javascript
const hashed = await hash('plaintext');
```

Compare hash with a plaintext string:

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

### Testing

Deploy the project locally:

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

Run tests:

```shell script
npm run test
```

Tests are done with [Jest](https://jestjs.io)

### Linting

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

```shell script
npm run lint
```

Using [ESLint](https://www.npmjs.com/package/eslint)

### License

[MIT](./LICENSE.md)

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