Merge pull request #464 from ethers/ripe160
make ripe160 preconditions be consistent like the other hashing functions
This commit is contained in:
commit
26f6770139
@ -40,9 +40,6 @@ var sha512hmac = exports.sha512hmac = function(data, key) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var ripe160 = exports.ripe160 = function(data) {
|
var ripe160 = exports.ripe160 = function(data) {
|
||||||
if (!Buffer.isBuffer(data)) {
|
|
||||||
throw new Error('arg should be a buffer');
|
|
||||||
}
|
|
||||||
if (process.browser) {
|
if (process.browser) {
|
||||||
return new Buffer(hashjs.ripemd160().update(data).digest());
|
return new Buffer(hashjs.ripemd160().update(data).digest());
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user