Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Commit

Permalink
changed crypto module to md5omatic used for getLeafKey hash generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikos Kampitakis committed Sep 25, 2015
1 parent 21f757d commit e2ae7e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/leaf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
var React = require('react');
var D = React.DOM;

var crypto = require('crypto');
var md5omatic = require('md5-o-matic');

var uid = require('./uid');
var type = require('./type');
Expand Down Expand Up @@ -215,7 +215,7 @@ function items(count) {
function getLeafKey(key, value) {
if (isPrimitive(value)) {
// TODO: Sanitize `value` better.
var hash = crypto.createHash('md5').update(String(value)).digest("hex");
var hash = md5omatic(String(value));
return key + ':' + hash;
} else {
return key + '[' + type(value) + ']';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"license": "MIT",
"dependencies": {
"crypto": "0.0.3",
"debounce": "1.0.0",
"md5-o-matic": "^0.1.1",
"object-assign": "2.0.0"
},
"devDependencies": {
Expand Down

0 comments on commit e2ae7e7

Please sign in to comment.