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 - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

3

fnv.js

@@ -20,2 +20,5 @@ "use strict"

}
// Make API chainable
return this;
},

@@ -22,0 +25,0 @@ digest: function(encoding) {

4

package.json
{
"name": "fnv",
"version": "0.1.2",
"version": "0.1.3",
"author": "Sebastian Wiedenroth <wiedi@frubar.net>",

@@ -20,2 +20,2 @@ "description": "Fowler–Noll–Vo hash implementation (FNV-1a 32-bit)",

]
}
}

@@ -17,5 +17,32 @@ # node-fnv

## API
### Class FNV
##### new FNV()
Create a new FNV hash object.
##### fnv.update(data)
- <code>data</code> 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])
- <code>encoding</code> String - can be <code>'hex'</code>, <code>'binary'</code> or <code>'base64'</code>
Returns the digest of all of the passed data to be hashed.
If no encoding is provided <code>'binary'</code> 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-04>
- <http://tools.ietf.org/html/draft-eastlake-fnv-06>

@@ -8,2 +8,6 @@ "use strict"

test('Chainable .update()', function(){
assert.equal(new FNV().update("foobar").digest("hex"), "bf9cf968");
})
test('#init', function(){

@@ -10,0 +14,0 @@ var h = new FNV()

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