Socket
Socket
Sign inDemoInstall

bip32

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bip32 - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

package.json
{
"name": "bip32",
"version": "2.0.1",
"version": "2.0.2",
"description": "A BIP32 compatible library",

@@ -5,0 +5,0 @@ "keywords": [

@@ -5,19 +5,16 @@ "use strict";

const createHmac = require('create-hmac');
let ripemd160;
try {
ripemd160 = require('crypto')
.getHashes()
.includes('rmd160')
? 'rmd160'
: 'ripemd160';
}
catch (err) {
ripemd160 = 'rmd160';
}
function hash160(buffer) {
return createHash(ripemd160)
.update(createHash('sha256')
const sha256Hash = createHash('sha256')
.update(buffer)
.digest())
.digest();
try {
return createHash('rmd160')
.update(sha256Hash)
.digest();
}
catch (err) {
return createHash('ripemd160')
.update(sha256Hash)
.digest();
}
}

@@ -24,0 +21,0 @@ exports.hash160 = hash160;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc