pub fn compute_artifact_hash(artifact_bytes: &[u8]) -> Vec<u8> ⓘExpand description
Compute the SHA-256 of an artifact’s bytes. Useful when a client only has the artifact (e.g. a cert DER) and needs the leaf hash input for the inclusion-proof verifier.
§Example
import init, { compute_artifact_hash } from "@confium/confium-wasm";
await init();
const h = compute_artifact_hash(certDerBytes); // Uint8Array(32)