|
@ -34,7 +34,7 @@ Hash.ripemd160 = function(buf) { |
|
|
|
|
|
|
|
|
// Node.js crypto ripemd160 hashes are not supported in a browser
|
|
|
// Node.js crypto ripemd160 hashes are not supported in a browser
|
|
|
// We'll replace with a (slower) version that does.
|
|
|
// We'll replace with a (slower) version that does.
|
|
|
if (global.window) { |
|
|
if (process.browser) { |
|
|
Hash.ripemd160 = function(buf) { |
|
|
Hash.ripemd160 = function(buf) { |
|
|
$.checkArgument(BufferUtil.isBuffer(buf)); |
|
|
$.checkArgument(BufferUtil.isBuffer(buf)); |
|
|
var hash = (new hashjs.ripemd160()).update(buf).digest(); |
|
|
var hash = (new hashjs.ripemd160()).update(buf).digest(); |
|
|