<commit_before>[![Build Status](https://travis-ci.org/auth0/limitd.svg)](https://travis-ci.org/auth0/node-baas)

Bcrypt as a service (node.js)


This module is a client and server.

## Server

Installation:

```
sudo npm i -g auth0/node-baas
```

Start a baas server on port 9485 and salt with 10 iterations:

```
baas -p 9485 -s 10
```

## Client

Install:

```
npm i auth0/node-baas
```

Usage

```javascript
var BaasClient = require('baas');
var baas = new BaasClient('server:9485');

//hash a password
baas.hash('<PASSWORD>', function (err, result) {
  console.log(result.hash)
});

//compare a password
baas.compare({hash: 'the bcrypt hash', password: '<PASSWORD>'}, function (err, result) {
  console.log(result.hash)
});

```

## License

MIT 2015 - AUTH0 INC.<commit_msg>minor<commit_after>[![Build Status](https://travis-ci.org/auth0/limitd.svg)](https://travis-ci.org/auth0/node-baas)

Bcrypt as a service (node.js)


This module is a client and server.

## Server

Installation:

```
sudo npm i -g auth0/node-baas
```

Start a baas server on port 9485 and salt with 10 iterations:

```
baas -p 9485 -s 10
```

## Client

Install:

```
npm i auth0/node-baas
```

Usage

```javascript
var BaasClient = require('baas');
var baas = new BaasClient('server:9485');

//hash a password
baas.hash('<PASSWORD>', function (err, result) {
  console.log(result.hash)
});

//compare a password
baas.compare({hash: 'the bcrypt hash', password: '<PASSWORD>'}, function (err, result) {
  console.log(result.success)
});

```

## License

MIT 2015 - AUTH0 INC.
{'fraction_non_alphanumeric': 0.1725692208628461, 'fraction_numerical': 0.03219575016097875, 'mean_word_length': 4.128712871287129, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '845661', 'n_tokens_mistral': 623, 'n_tokens_neox': 563, 'n_words': 155}