trestle.core.canonicalization
trestle.core.canonicalization ¤
Canonical JSON helpers for reproducible OSCAL artifact digests.
Classes¤
Functions¤
canonicalize_json_object(json_obj) ¤
Return RFC 8785 canonical UTF-8 bytes for a parsed JSON-compatible object.
Source code in trestle/core/canonicalization.py
51 52 53 54 55 56 | |
canonicalize_json_text(json_text) ¤
Parse JSON text and return its parsed object and canonical bytes.
Source code in trestle/core/canonicalization.py
39 40 41 42 43 44 45 46 47 48 | |
load_canonical_json_file(path) ¤
Load a JSON document and return its parsed object and canonical bytes.
Source code in trestle/core/canonicalization.py
31 32 33 34 35 36 | |
sha256_digest_hex(data) ¤
Return a SHA-256 digest for canonical bytes.
Source code in trestle/core/canonicalization.py
59 60 61 | |
handler: python