ReklatsMasters/vuze-spoof-id

View on GitHub
readme.md

Summary

Maintainability
Test Coverage
# vuze-spoof-id

[![travis](https://travis-ci.org/ReklatsMasters/vuze-spoof-id.svg)](https://travis-ci.org/ReklatsMasters/vuze-spoof-id)
[![npm](https://img.shields.io/npm/v/vuze-spoof-id.svg)](https://npmjs.org/package/vuze-spoof-id)
[![license](https://img.shields.io/npm/l/vuze-spoof-id.svg)](https://npmjs.org/package/vuze-spoof-id)
[![downloads](https://img.shields.io/npm/dm/vuze-spoof-id.svg)](https://npmjs.org/package/vuze-spoof-id)
[![Code Climate](https://codeclimate.com/github/ReklatsMasters/vuze-spoof-id/badges/gpa.svg)](https://codeclimate.com/github/ReklatsMasters/vuze-spoof-id)
[![Test Coverage](https://codeclimate.com/github/ReklatsMasters/vuze-spoof-id/badges/coverage.svg)](https://codeclimate.com/github/ReklatsMasters/vuze-spoof-id)

## Example
```js
const spoof = require('vuze-spoof-id')

var key = spoof.key()
var id = spoof.id('1.2.3.4', key) // id is number
```

## API

#### `key(): Buffer`
Randomly generated key spoof key. Generated at the start dht agent.

#### `id(ip: String, spoof_key: Buffer): Number`
Return id for ipv4 address `ip`.

## License
MIT, 2016 (c) Dmitry Tsvettsikh