An open API service indexing awesome lists of open source software.

https://github.com/dcousens/habanero

An attempt-limiting, remote pepper provisioning protocol with a bundled Javascript implementation.
https://github.com/dcousens/habanero

crypto cryptograph derivation hmac javascript kdf key node pepper salt

Last synced: 17 days ago
JSON representation

An attempt-limiting, remote pepper provisioning protocol with a bundled Javascript implementation.

Awesome Lists containing this project

README

          

# habanero
[![build status](https://secure.travis-ci.org/dcousens/habanero.png)](http://travis-ci.org/dcousens/habanero)
[![NPM](https://img.shields.io/npm/v/habanero.svg)](https://www.npmjs.org/package/habanero)

An experimental attempt-limiting, remote pepper provisioning protocol with a bundled Javascript implementation.

### WARNING: This protocol has not been peer reviewed - use at your own risk.

## [Protocol](PROTOCOL.md)

## Example
``` javascript
```

``` javascript
let hb = require('habanero/server')
let e = Buffer.from(process.env.HABANERO_SECRET, 'ascii')

// ...
hb.get(e, commitment, P, queryCb, limitCb, (err, result) => {
if (err) return res.status(500).end()
if (result.limited) return res.status(403).end() // optional (information leak)
if (!result.pepper) return res.status(401).end()

res.status(200).json(result)
})
```

## LICENSE [MIT](LICENSE)