Compute the SHA-256 fingerprint of the Org CA public key. Args: public_key_bytes: Raw CA public key bytes. If None, uses the default CA. Returns: 64-char lowercase hex string.
(public_key_bytes: bytes | None = None)
| 57 | |
| 58 | |
| 59 | def compute_ca_fingerprint(public_key_bytes: bytes | None = None) -> str: |
| 60 | """ |
| 61 | Compute the SHA-256 fingerprint of the Org CA public key. |
| 62 | |
| 63 | Args: |
| 64 | public_key_bytes: Raw CA public key bytes. If None, uses the default CA. |
| 65 | |
| 66 | Returns: |
| 67 | 64-char lowercase hex string. |
| 68 | """ |
| 69 | if public_key_bytes is None: |
| 70 | _, public_key_bytes = _ensure_ca_keypair() |
| 71 | return hashlib.sha256(public_key_bytes).hexdigest() |
| 72 | |
| 73 | |
| 74 | # ── Agent Keypair Generation ────────────────────────────────────────────────── |
no test coverage detected