multihashes-sync
Advanced tools
Comparing version 1.1.0 to 1.1.1
import { createHash } from "crypto"; | ||
import { SyncHasher } from "./sync-hasher.js"; | ||
export const sha256 = new SyncHasher("sha2-256", 0x12, (bytes) => { | ||
return createHash("sha256").update(bytes).digest(); | ||
import { coerce } from "multiformats/bytes"; | ||
export const sha256 = new SyncHasher("sha2-256", 0x12, (input) => { | ||
return coerce(createHash("sha256").update(input).digest()); | ||
}); | ||
export const sha512 = new SyncHasher("sha2-512", 0x13, (bytes) => { | ||
return createHash("sha512").update(bytes).digest(); | ||
export const sha512 = new SyncHasher("sha2-512", 0x13, (input) => { | ||
return coerce(createHash("sha512").update(input).digest()); | ||
}); |
{ | ||
"name": "multihashes-sync", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Synchronous SHA256, SHA512 multihashes", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
3837
40