fnv32

0.0.1 • Public • Published

fnv32

build status NPM version node version

FNV (Fowler–Noll–Vo) 32 bit hash function: FNV-1, FNV-1a.

References: https://tools.ietf.org/html/draft-eastlake-fnv-12, https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function

Installation

npm install fnv32

Example

const fnv32 = require('fnv32');
 
var hashed = fnv32.fnv_1a( 'hello' );  // input Buffer or String.
console.log('hashed number: ' + hashed);  // unsigned 32 bit integer.
 
// functions: .fnv_1( Buffer|String ), .fnv_1a( Buffer|String ), .toBufferLE( Number )
 

Test

npm test

License

Choose either: MIT or Apache 2.0.

Package Sidebar

Install

npm i fnv32

Weekly Downloads

90

Version

0.0.1

License

MIT

Last publish

Collaborators

  • fluidecho