aws_encryption_sdk.caches¶
Common functions and structures for use in cryptographic materials caches.
New in version 1.3.0.
Functions
build_decryption_materials_cache_key (…) |
Generates a cache key for a decrypt request. |
build_encryption_materials_cache_key (…) |
Generates a cache key for an encrypt request. |
Classes
CryptoMaterialsCacheEntry (cache_key, value) |
Value and metadata store for cryptographic materials cache entries. |
CryptoMaterialsCacheEntryHints ([lifetime]) |
Optional metadata to associate with cryptographic materials cache entries. |
-
class
aws_encryption_sdk.caches.
CryptoMaterialsCacheEntry
(cache_key, value, hints=NOTHING)¶ Bases:
object
Value and metadata store for cryptographic materials cache entries.
Parameters: - cache_key (bytes) – Identifier for entries in cache
- value – Value to store in cache entry
- hints (aws_encryption_sdk.caches.CryptoMaterialsCacheEntryHints) – Metadata to associate with entry (optional)
-
invalidate
()¶ Marks a cache entry as invalidated.
-
class
aws_encryption_sdk.caches.
CryptoMaterialsCacheEntryHints
(lifetime=None)¶ Bases:
object
Optional metadata to associate with cryptographic materials cache entries.
Parameters: lifetime (float) – Number of seconds to retain entry in cache (optional)
-
aws_encryption_sdk.caches.
build_decryption_materials_cache_key
(partition, request)¶ Generates a cache key for a decrypt request.
Parameters: - partition (bytes) – Partition name for which to generate key
- request (aws_encryption_sdk.materials_managers.DecryptionMaterialsRequest) – Request for which to generate key
Returns: cache key
Return type:
-
aws_encryption_sdk.caches.
build_encryption_materials_cache_key
(partition, request)¶ Generates a cache key for an encrypt request.
Parameters: - partition (bytes) – Partition name for which to generate key
- request (aws_encryption_sdk.materials_managers.EncryptionMaterialsRequest) – Request for which to generate key
Returns: cache key
Return type: