Cryptographic Configuration

Resources for encrypting items.

class dynamodb_encryption_sdk.encrypted.CryptoConfig(materials_provider, encryption_context, attribute_actions)[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()[source]

Load decryption materials from instance resources.

Returns:Decryption materials
Return type:CryptographicMaterials
encryption_materials()[source]

Load encryption materials from instance resources.

Returns:Encryption materials
Return type:CryptographicMaterials
copy()[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