New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ota_zip_get_info

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ota_zip_get_info - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

3

package.json
{
"name": "ota_zip_get_info",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

@@ -16,4 +16,5 @@ "main": "index.js",

"dependencies": {
"js-sha256": "^0.11.0",
"jszip": "^3.10.1"
}
}

@@ -0,6 +1,9 @@

import {sha256} from "js-sha256";
async function getHash(buffer) {
const hashBuffer = await crypto.subtle.digest("SHA-256", buffer);
const hashArray = Array.from(new Uint8Array(hashBuffer));
const hashHex = hashArray.map(b => b.toString(16).padStart(2, "0")).join("");
return hashHex;
// const hashBuffer = await crypto.subtle.digest("SHA-256", buffer);
// const hashArray = Array.from(new Uint8Array(hashBuffer));
// const hashHex = hashArray.map(b => b.toString(16).padStart(2, "0")).join("");
// return hashHex;
return sha256(buffer)
}

@@ -7,0 +10,0 @@

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