MCPcopy
hub / github.com/MetapriseAI/OrgKernel / compute_ca_fingerprint

Function compute_ca_fingerprint

src/orgkernel/crypto_utils.py:59–71  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

57
58
59def 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 ──────────────────────────────────────────────────

Callers 1

issue_from_csrMethod · 0.90

Calls 1

_ensure_ca_keypairFunction · 0.85

Tested by

no test coverage detected