# @rojo2/password

> Library to do safe password hashing using PBKDF2

Latest version **1.1.1** (published 2018-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @rojo2/password
pnpm add @rojo2/password
yarn add @rojo2/password
bun add @rojo2/password
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-05-15 |
| First published | 2017-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=6.3.0 |
| Dependencies | 1 |
| Unpacked size | 14.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ROJO 2 |
| Maintainers | aitormm, azazeln28 |
| Keywords | password, pbkdf2 |

## Links

- npm: https://www.npmjs.com/package/@rojo2/password
- Repository: https://github.com/rojo2/password
- Homepage: https://github.com/rojo2/password#readme
- Issues: https://github.com/rojo2/password/issues
- npm.io page: https://npm.io/package/@rojo2/password

## Dependencies (1)

- [chai](https://npm.io/package/chai.md) ^3.5.0

## Recent versions

- 1.1.1 (latest) — 2018-05-15
- 1.1.0 — 2018-05-15
- 1.0.1 — 2017-11-24

## README

# Password
![Travis CI](https://travis-ci.org/rojo2/password.svg?branch=master)

Password hash library using PBKDF2.

```javascript
import password from "@rojo2/password";

// Hash password
const hashedPassword = await password.hash("plainPassword")

// Verify password
const result = await password.verify("plainPassword", "hashedPassword");
if (result === true) {
  // Password is ok.
} else {
  // Passwords doesn't match.
}
```

Or if you prefer promises:

```javascript
import password from "@rojo2/password";

// Hash password
password.hash("plainPassword").then((hashedPassword) => {
  // ... do something with the hashed password (like saving it in a mongodb object) ...
}).catch((error) => {
  // ...
});

// Verify password
password.verify("plainPassword", "hashedPassword").then((result) => {
	if (result === true) {
		// Password is ok.
	} else {
		// Passwords doesn't match.
	}
}).catch((error) => {
  // ...
});
```

Made with ❤ by ROJO 2 (http://rojo2.com)

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