STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fingerprint.py
Go to the documentation of this file.
1"""The design's identity: a hash of its validated contents, the same wherever it is taken."""
2
3from __future__ import annotations
4
5import hashlib
6import json
7from typing import Any
8
9
10def config_fingerprint(config: Any) -> str:
11 raw = json.dumps(config.model_dump(mode="json"), sort_keys=True, default=str).encode("utf-8")
12 return hashlib.sha256(raw).hexdigest()
str config_fingerprint(Any config)