aws_encryption_sdk.keyrings.base

Base class interface for Keyrings.

Classes

Keyring Parent interface for Keyring classes.
class aws_encryption_sdk.keyrings.base.Keyring

Bases: object

Parent interface for Keyring classes.

New in version 1.5.0.

on_decrypt(decryption_materials, encrypted_data_keys)

Attempt to decrypt the encrypted data keys.

Parameters:
Returns:

Optionally modified decryption materials.

Return type:

DecryptionMaterials

Raises:

NotImplementedError – if method is not implemented

on_encrypt(encryption_materials)

Generate a data key if not present and encrypt it using any available wrapping key.

Parameters:encryption_materials (EncryptionMaterials) – Encryption materials for keyring to modify.
Returns:Optionally modified encryption materials.
Return type:EncryptionMaterials
Raises:NotImplementedError – if method is not implemented