multihashes-sync
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
3776
+ Added@noble/hashes@^1.3.0
+ Added@noble/hashes@1.5.0(transitive)
+ Addedmultiformats@11.0.2(transitive)
- Removed@stablelib/sha256@^1.0.1
- Removed@stablelib/sha512@^1.0.1
- Removed@stablelib/binary@1.0.1(transitive)
- Removed@stablelib/hash@1.0.1(transitive)
- Removed@stablelib/int@1.0.1(transitive)
- Removed@stablelib/sha256@1.0.1(transitive)
- Removed@stablelib/sha512@1.0.1(transitive)
- Removed@stablelib/wipe@1.0.1(transitive)
- Removedmultiformats@9.9.0(transitive)
Updatedmultiformats@^11.0.0