@joinmonolith/c2pa-node
    Preparing search index...

    Interface DataHash

    A pre-computed data hash assertion. Pass to signDataHashedEmbeddable to produce a signed embeddable manifest without needing the asset bytes at sign time (e.g. for sidecar / remote-manifest workflows).

    For a spec-compliant raw SHA-256 of the whole asset, use: { alg: "sha256", hash: <raw sha256 bytes>, exclusions: [], pad: Buffer.alloc(0) }

    The shape mirrors the c2pa-rs DataHash serde struct. hash and pad are serialized as byte arrays (serde_bytes).

    interface DataHash {
        alg?: "sha256" | "sha384" | "sha512";
        exclusions?: { length: number; start: number }[];
        hash: number[] | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
        name?: string;
        pad?: number[] | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
    }
    Index

    Properties

    alg?: "sha256" | "sha384" | "sha512"

    Hash algorithm. Use "sha256" for sidecar / spec-compliant flows.

    exclusions?: { length: number; start: number }[]

    Byte ranges (in the target asset) excluded from the hash. Empty means the hash covers the entire asset.

    hash: number[] | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

    Hash bytes.

    name?: string

    Optional friendly name (e.g. "raw asset").

    pad?: number[] | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>

    Padding bytes. May be empty.