Cryptographic Configuration

Resources for encrypting items.

class dynamodb_encryption_sdk.encrypted.CryptoConfig(materials_provider: dynamodb_encryption_sdk.material_providers.CryptographicMaterialsProvider, encryption_context: dynamodb_encryption_sdk.structures.EncryptionContext, attribute_actions: dynamodb_encryption_sdk.structures.AttributeActions)[source]

Bases: object

Container for all configuration needed to encrypt or decrypt an item using the item encryptor functions in dynamodb_encryption_sdk.encrypted.item.

Parameters
  • materials_provider (CryptographicMaterialsProvider) – Cryptographic materials provider to use

  • encryption_context (EncryptionContext) – Context data describing what is being encrypted or decrypted

  • attribute_actions (AttributeActions) – Description of what action should be taken for each attribute

decryption_materials() dynamodb_encryption_sdk.materials.CryptographicMaterials[source]

Load decryption materials from instance resources.

Returns

Decryption materials

Return type

CryptographicMaterials

encryption_materials() dynamodb_encryption_sdk.materials.CryptographicMaterials[source]

Load encryption materials from instance resources.

Returns

Encryption materials

Return type

CryptographicMaterials

copy() dynamodb_encryption_sdk.encrypted.CryptoConfig[source]

Return a copy of this instance with a copied instance of its encryption context.

Returns

New CryptoConfig identical to this one

Return type

CryptoConfig

with_item(item)[source]

Return a copy of this instance with an encryption context that includes the provided item attributes.

Parameters

item (dict) – DynamoDB item in DynamnoDB JSON format

Returns

New CryptoConfig identical to this one

Return type

CryptoConfig