aws_encryption_sdk.caches.null

Null cache: a cache which does not cache.

Classes

NullCryptoMaterialsCache()

Null cache: a cache which does not cache.

class aws_encryption_sdk.caches.null.NullCryptoMaterialsCache

Bases: CryptoMaterialsCache

Null cache: a cache which does not cache.

New in version 1.3.0.

put_encryption_materials(cache_key, encryption_materials, plaintext_length, entry_hints=None)

Does not add encryption materials to the cache since there is no cache to which to add them.

Parameters
  • cache_key (bytes) – Identifier for entries in cache

  • encryption_materials (aws_encryption_sdk.materials_managers.EncryptionMaterials) – Encryption materials to add to cache

  • plaintext_length (int) – Length of plaintext associated with this request to the cache

  • entry_hints (aws_encryption_sdk.caches.CryptoCacheEntryHints) – Metadata to associate with entry (optional)

Return type

aws_encryption_sdk.caches.CryptoMaterialsCacheEntry

put_decryption_materials(cache_key, decryption_materials)

Does not add decryption materials to the cache since there is no cache to which to add them.

Parameters
Return type

aws_encryption_sdk.caches.CryptoMaterialsCacheEntry

get_encryption_materials(cache_key, plaintext_length)

Always raises a CacheKeyError.

Parameters
  • cache_key (bytes) – Cache ID for which to locate cache entries

  • plaintext_length (int) – Bytes to be encrypted by the encryption materials

Return type

aws_encryption_sdk.caches.CryptoCacheEntry

Raises

CacheKeyError – when called

get_decryption_materials(cache_key)

Always raises a CacheKeyError.

Parameters

cache_key (bytes) – Cache ID for which to locate cache entries

Return type

aws_encryption_sdk.caches.CryptoCacheEntry

Raises

CacheKeyError – when called