remove ripemd160 dep., replace with hash.js
This commit is contained in:
parent
e0deb0407c
commit
ca4131ab05
1
index.js
1
index.js
|
@ -6,7 +6,6 @@ privsec.deps.bs58 = require('bs58');
|
|||
privsec.deps.elliptic = require('elliptic');
|
||||
privsec.deps.hashjs = require('hash.js');
|
||||
privsec.deps.sha512 = require('sha512');
|
||||
privsec.deps.ripemd160 = require('ripemd160');
|
||||
|
||||
privsec.address = require('./lib/address');
|
||||
privsec.base58 = require('./lib/base58');
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
var hashjs = require('hash.js');
|
||||
var sha512 = require('sha512');
|
||||
var ripemd160 = require('ripemd160');
|
||||
|
||||
var Hash = module.exports;
|
||||
|
||||
|
@ -22,7 +21,7 @@ Hash.sha256sha256 = function(buf) {
|
|||
Hash.ripemd160 = function(buf) {
|
||||
if (!Buffer.isBuffer(buf))
|
||||
throw new Error('ripemd160 hash must be of a buffer');
|
||||
var hash = ripemd160(buf);
|
||||
var hash = (new hashjs.ripemd160()).update(buf).digest();
|
||||
return new Buffer(hash);
|
||||
};
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
"bs58": "=1.2.1",
|
||||
"elliptic": "=0.15.7",
|
||||
"hash.js": "=0.3.1",
|
||||
"ripemd160": "=0.2.0",
|
||||
"sha512": "=0.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
Loading…
Reference in New Issue