Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fnv

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fnv

Fowler–Noll–Vo hash implementation (FNV-1a 32-bit)

  • 0.1.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

  • http://isthe.com/chongo/tech/comp/fnv/
  • http://tools.ietf.org/html/draft-eastlake-fnv-06

FAQs

Package last updated on 08 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc