New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

merkle

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merkle - npm Package Compare versions

Comparing version 0.5.0 to 0.5.1

7

merkle.js

@@ -35,8 +35,9 @@

function feed(anyData) {
if(anyData && anyData.match(that.hashResultRegexp)){
var data = String(anyData);
if(data && data.match(that.hashResultRegexp)){
// Push leaf without hashing it since it is already a hash
that.leaves.push(anyData);
that.leaves.push(data);
}
else{
var hash = hashFunc(anyData);
var hash = hashFunc(data);
if (useUpperCaseForHash) {

@@ -43,0 +44,0 @@ hash = hash.toUpperCase();

{
"name": "merkle",
"version": "0.5.0",
"version": "0.5.1",
"description": "Javascript implementation of merkle trees",

@@ -5,0 +5,0 @@ "main": "merkle.js",

@@ -50,2 +50,15 @@ # Merkle [![Build Status](https://api.travis-ci.org/c-geek/merkle.png)](https://travis-ci.org/c-geek/merkle) [![NPM version](https://badge.fury.io/js/merkle.svg)](http://badge.fury.io/js/merkle) [![Licence](http://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/c-geek/merkle/blob/master/LICENSE)

### Working ONLY with lowercase
For historical reasons, hashes were systematically uppercased which could lead to wrong trees (see issue [#8](https://github.com/c-geek/merkle/issues/8)).
We've added an extra parameter to avoid this case alteration, so you can work exclusively with lowercase hashes:
```
var use_uppercase = false;
merkle('sha256', use_uppercase);
```
> We plan to remove this syntax for v1.0.0 and always use lowercase hashes.
### Extract tree data

@@ -52,0 +65,0 @@

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