Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ node-fnv Public

Fowler–Noll–Vo hash implementation for node.js

License

wiedi/node-fnv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-fnv

Fowler–Noll–Vo (FNV-1a 32-bit) hash implementation for node.js

Install

npm install fnv

Usage

var FNV = require("fnv").FNV
var h = new FNV()
h.update(Buffer("foobar"))
h.digest("hex") // 'bf9cf968'

API

Class FNV

new FNV()

Create a new FNV hash object.

fnv.update(data)
  • data Buffer or String (UTF-8 encoded)

Updates the hash content with the given data. This can be called many times with new data.

fnv.digest([encoding])
  • encoding String - can be 'hex', 'binary' or 'base64'

Returns the digest of all of the passed data to be hashed. If no encoding is provided 'binary' is used.

fnv.value()

Returns the hash value as Number

References

About

Fowler–Noll–Vo hash implementation for node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •