Files

8 lines
237 B
Python

"""Independent canonical JSON digests for synthetic evidence fixtures."""
import hashlib
import json
def canonical_digest(value):
return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(",", ":")).encode()).hexdigest()