Class McpProtectionKey
java.lang.Object
com.soklet.McpProtectionKey
Immutable, purpose-specific MCP request-state protection master key.
Supplied bytes are defensively copied and are never exposed through the public API, diagnostic rendering, logs, metrics, fingerprints, or exception messages. Applications remain responsible for generating key material with a cryptographically secure random source and at least 256 bits of entropy.
Instances intentionally retain reference identity so secret key material
never participates in public equality or hash-code operations. Use
McpProtectionKeyringSnapshot.getFingerprint() when comparing
complete non-secret keyring configurations across instances.
- Author:
- Mark Allen
-
Method Summary
-
Method Details
-
fromIdAndBytes
public static @NonNull McpProtectionKey fromIdAndBytes(@NonNull String keyId, byte @NonNull [] keyMaterial) Creates a protection master key from exact bytes.- Parameters:
keyId- 1-64-byte ASCII HTTP tokenkeyMaterial- at least 32 bytes of operator-generated key material- Returns:
- immutable key value
- Throws:
IllegalArgumentException- if the ID or material is invalid
-
getKeyId
-
toString
-