Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multihashes-sync

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multihashes-sync - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

8

dist/sha2.browser.js

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

import { hash as stableSHA256 } from "@stablelib/sha256";
import { hash as stableSHA512 } from "@stablelib/sha512";
import { sha256 as nobleSHA256 } from "@noble/hashes/sha256";
import { sha512 as nobleSHA512 } from "@noble/hashes/sha512";
import { SyncHasher } from "./sync-hasher.js";
export const sha256 = new SyncHasher("sha2-256", 0x12, (bytes) => stableSHA256(bytes));
export const sha512 = new SyncHasher("sha2-512", 0x13, (bytes) => stableSHA512(bytes));
export const sha256 = new SyncHasher("sha2-256", 0x12, (bytes) => nobleSHA256(bytes));
export const sha512 = new SyncHasher("sha2-512", 0x13, (bytes) => nobleSHA512(bytes));
{
"name": "multihashes-sync",
"version": "1.0.0",
"version": "1.1.0",
"description": "Synchronous SHA256, SHA512 multihashes",

@@ -40,19 +40,17 @@ "keywords": [

},
"scripts": {
"test": "./node_modules/.bin/tsm ./node_modules/uvu/bin.js . .+\\.test\\.ts",
"build": "./node_modules/.bin/tsc --project tsconfig.build.json",
"prepublishOnly": "pnpm run build"
},
"devDependencies": {
"@types/node": "^18.7.23",
"prettier": "^2.7.1",
"tsm": "^2.2.2",
"typescript": "^4.8.3",
"@types/node": "^18.16.7",
"prettier": "^2.8.8",
"tsm": "^2.3.0",
"typescript": "^5.0.4",
"uvu": "^0.5.6"
},
"dependencies": {
"@stablelib/sha256": "^1.0.1",
"@stablelib/sha512": "^1.0.1",
"multiformats": "^9.9.0"
"@noble/hashes": "^1.3.0",
"multiformats": "^11.0.0"
},
"scripts": {
"test": "./node_modules/.bin/tsm ./node_modules/uvu/bin.js . .+\\.test\\.ts",
"build": "./node_modules/.bin/tsc --project tsconfig.build.json"
}
}
}

@@ -17,3 +17,3 @@ # multihashes-sync

```ts
import { sha256, sha512 } from 'multihashes-sync'
import { sha256, sha512 } from 'multihashes-sync/sha2'
var bytes = Uint8Array.from([0, 1, 2, 3])

@@ -20,0 +20,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