Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions lib/crypto/hash.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

var hashjs = require('hash.js');
var sha512 = require('sha512');
var crypto = require('crypto');
var BufferUtil = require('../util/buffer');
Expand Down Expand Up @@ -32,16 +31,6 @@ Hash.ripemd160 = function(buf) {
return crypto.createHash('ripemd160').update(buf).digest();
};

// Node.js crypto ripemd160 hashes are not supported in a browser
// We'll replace with a (slower) version that does.
if (process.browser) {
Hash.ripemd160 = function(buf) {
$.checkArgument(BufferUtil.isBuffer(buf));
var hash = (new hashjs.ripemd160()).update(buf).digest();
return new Buffer(hash);
};
}

Hash.sha256ripemd160 = function(buf) {
$.checkArgument(BufferUtil.isBuffer(buf));
return Hash.ripemd160(Hash.sha256(buf));
Expand Down
10 changes: 5 additions & 5 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"bs58": "=2.0.0",
"buffer-compare": "=1.0.0",
"elliptic": "=3.0.3",
"hash.js": "=1.0.2",
"inherits": "=2.0.1",
"lodash": "=3.10.1",
"sha512": "=0.0.1"
Expand Down