diff --git a/orsopy/fileio/base.py b/orsopy/fileio/base.py index 8e3db140..6c352d44 100644 --- a/orsopy/fileio/base.py +++ b/orsopy/fileio/base.py @@ -724,6 +724,16 @@ def to_sigma(self): return 1.0 +@orsodataclass +class ContentHash(Header): + """ + A hash of some content, using standard algorithms + """ + + digest: str + algorithm: Literal["sha1", "sha256", "sha384", "sha512", "sha3_256", "sha3_512"] + + @orsodataclass class File(Header): """ @@ -739,6 +749,7 @@ class File(Header): " itself" }, ) + hash: Optional[ContentHash] = None def __post_init__(self): """