mud_server.services.policy.hashing

Deterministic hashing helpers for policy service payloads.

Functions

compute_content_hash(*, policy_id, variant, content)

Return deterministic hash for one canonical policy variant payload.

compute_artifact_hash(*, artifact)

Compute deterministic artifact hash excluding self-referential hash key.

Module Contents

mud_server.services.policy.hashing.compute_content_hash(*, policy_id, variant, content)[source]

Return deterministic hash for one canonical policy variant payload.

Identity and variant are included in the hash envelope so two policies with identical content still hash differently at contract level.

mud_server.services.policy.hashing.compute_artifact_hash(*, artifact)[source]

Compute deterministic artifact hash excluding self-referential hash key.