# mongoose-bcrypt-compare

> Utility for checking multiple bcrypt hashed passwords.

Latest version **0.1.4** (published 2015-04-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install mongoose-bcrypt-compare
pnpm add mongoose-bcrypt-compare
yarn add mongoose-bcrypt-compare
bun add mongoose-bcrypt-compare
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2015-04-17 |
| First published | 2015-03-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joel Malinao |
| Maintainers | joemalski |
| Keywords | mongoose, bcrypt, compare, hash |

## Links

- npm: https://www.npmjs.com/package/mongoose-bcrypt-compare
- Repository: https://github.com/joemalski/mongoose-bcrypt-compare
- Issues: https://github.com/joemalski/mongoose-bcrypt-compare/issues
- npm.io page: https://npm.io/package/mongoose-bcrypt-compare

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 0.1.4 (latest) — 2015-04-17
- 0.1.3 — 2015-04-17
- 0.1.2 — 2015-03-27
- 0.1.1 — 2015-03-27

## README

mongoose-bcrypt-compare
=======================

Utility for checking multiple passwords hashed in bcrypt.  Enables you to check if a certain string is already used as a password.

## Installation

npm install mongoose-bcrypt-compare

## Dependencies
bcrypt

## Usage

```javascript
checkEachHash(passwordToCompare, dbResultSet, showLog)

passwordToCompare -> is the string password to be compared to the hash
dbResultSet -> the json result set (the actual hashed password)
showLog -> shows the log in the node.js server

returns-> true/false

var compare = require('mongoose-bcrypt-compare');

// where `hash` is a json result from db
PasswordModel.find({}, {_id: 0, password: 1}, function(err, hash){
  if(!err) {
    var result = '';
    result = compare.checkEachHash(req.body.findpwd, hash, 1);
    res.render('findpassword', {check_password: result});
  }
});
```

## Release History
0.1.2 - initial release<br>
0.1.3 - added show log<br>
0.1.4 - just edit readme

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