Skip to content

Class swarmauri_mre_crypto_keyring.KeyringMreCrypto.KeyringClient

swarmauri_mre_crypto_keyring.KeyringMreCrypto.KeyringClient

Bases: Protocol

Minimal protocol an external KMS/HSM 'keyring' client must implement.

id

id()

Stable identifier for this keyring.

Source code in swarmauri_mre_crypto_keyring/KeyringMreCrypto.py
47
48
def id(self) -> str:
    """Stable identifier for this keyring."""

wrap_cek async

wrap_cek(cek, *, context)

Return an opaque header which lets this keyring later release the same CEK.

Source code in swarmauri_mre_crypto_keyring/KeyringMreCrypto.py
50
51
async def wrap_cek(self, cek: bytes, *, context: Mapping[str, bytes]) -> bytes:
    """Return an opaque header which lets this keyring later release the same CEK."""

unwrap_cek async

unwrap_cek(header, *, context)

Return the CEK if the caller is authorized and policy is satisfied.

Source code in swarmauri_mre_crypto_keyring/KeyringMreCrypto.py
53
54
async def unwrap_cek(self, header: bytes, *, context: Mapping[str, bytes]) -> bytes:
    """Return the CEK if the caller is authorized and policy is satisfied."""