Compute a SHA-3 hash, preferring WebCrypto when available.
Supports SHA3-256 and SHA3-512. Falls back to @noble/hashes when WebCrypto does not support SHA-3.
const result = await modernSha3Hash({ algorithm: "SHA3-256", data: "hello world",});console.log(result.digest); // hex string Copy
const result = await modernSha3Hash({ algorithm: "SHA3-256", data: "hello world",});console.log(result.digest); // hex string
Compute a SHA-3 hash, preferring WebCrypto when available.
Supports SHA3-256 and SHA3-512. Falls back to @noble/hashes when WebCrypto does not support SHA-3.