aws_encryption_sdk.caches
Common functions and structures for use in cryptographic materials caches.
New in version 1.3.0.
Functions
Generates a cache key for a decrypt request. |
|
Generates a cache key for an encrypt request. |
Classes
|
Value and metadata store for cryptographic materials cache entries. |
|
Optional metadata to associate with cryptographic materials cache entries. |
- 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
- 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
- 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)
Method generated by attrs for class CryptoMaterialsCacheEntryHints.
- class aws_encryption_sdk.caches.CryptoMaterialsCacheEntry(cache_key, value, hints=_Nothing.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)
Method generated by attrs for class CryptoMaterialsCacheEntry.
- invalidate()
Marks a cache entry as invalidated.