Socket
Socket
Sign inDemoInstall

@ethersproject/sha2

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/sha2 - npm Package Compare versions

Comparing version 5.6.1 to 5.7.0

2

lib.esm/_version.d.ts

@@ -1,2 +0,2 @@

export declare const version = "sha2/5.6.1";
export declare const version = "sha2/5.7.0";
//# sourceMappingURL=_version.d.ts.map

@@ -1,2 +0,2 @@

export const version = "sha2/5.6.1";
export const version = "sha2/5.7.0";
//# sourceMappingURL=_version.js.map

@@ -1,2 +0,2 @@

export declare const version = "sha2/5.6.1";
export declare const version = "sha2/5.7.0";
//# sourceMappingURL=_version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "sha2/5.6.1";
exports.version = "sha2/5.7.0";
//# sourceMappingURL=_version.js.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.computeHmac = exports.sha512 = exports.sha256 = exports.ripemd160 = void 0;
var crypto_1 = require("crypto");
var hash_js_1 = __importDefault(require("hash.js"));
var bytes_1 = require("@ethersproject/bytes");

@@ -11,3 +15,3 @@ var types_1 = require("./types");

function ripemd160(data) {
return "0x" + (0, crypto_1.createHash)("ripemd160").update(Buffer.from((0, bytes_1.arrayify)(data))).digest("hex");
return "0x" + (hash_js_1.default.ripemd160().update((0, bytes_1.arrayify)(data)).digest("hex"));
}

@@ -14,0 +18,0 @@ exports.ripemd160 = ripemd160;

@@ -10,4 +10,4 @@ {

"dependencies": {
"@ethersproject/bytes": "^5.6.1",
"@ethersproject/logger": "^5.6.0",
"@ethersproject/bytes": "^5.7.0",
"@ethersproject/logger": "^5.7.0",
"hash.js": "1.1.7"

@@ -27,3 +27,3 @@ },

],
"gitHead": "a71f51825571d1ea0fa997c1352d5b4d85643416",
"gitHead": "ec1b9583039a14a0e0fa15d0a2a6082a2f41cf5b",
"keywords": [

@@ -49,5 +49,5 @@ "Ethereum",

"sideEffects": false,
"tarballHash": "0x58244d942ce5375a950835ae8016a684fdaaaabf9e8fad90e7c91e0add3405d1",
"tarballHash": "0xf4e98e42d47de50b1a899374350f5257d0ea9a604d59546ab0acbed6d89eceb6",
"types": "./lib/index.d.ts",
"version": "5.6.1"
"version": "5.7.0"
}

@@ -1,1 +0,1 @@

export const version = "sha2/5.6.1";
export const version = "sha2/5.7.0";

@@ -5,2 +5,4 @@ "use strict";

import hash from "hash.js";
import { arrayify, BytesLike } from "@ethersproject/bytes";

@@ -15,3 +17,3 @@

export function ripemd160(data: BytesLike): string {
return "0x" + createHash("ripemd160").update(Buffer.from(arrayify(data))).digest("hex")
return "0x" + (hash.ripemd160().update(arrayify(data)).digest("hex"));
}

@@ -18,0 +20,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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