You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
withopen(plaintext_filename, 'rb') as pt_file, open(ciphertext_filename, 'wb') as ct_file:
239
239
with client.stream(
240
240
mode='e',
241
241
source=pt_file,
242
-
keyring=#TODO: provide keyring
242
+
keyring=#TODO-MPL: provide keyring
243
243
) as encryptor:
244
244
for chunk in encryptor:
245
245
ct_file.write(chunk)
@@ -250,7 +250,7 @@ TODO: Update code example to use a keyring
250
250
with client.stream(
251
251
mode='d',
252
252
source=ct_file,
253
-
keyring=#TODO: provide keyring
253
+
keyring=#TODO-MPL: provide keyring
254
254
) as decryptor:
255
255
for chunk in decryptor:
256
256
pt_file.write(chunk)
@@ -268,6 +268,10 @@ to your use-case in order to obtain peak performance.
268
268
269
269
Thread safety
270
270
==========================
271
+
TODO-MPL: need to write about keyring thread safety.
272
+
kms keyrings definitely not thread safe.
273
+
raw keyrings need testing, but may be launched as not thread safe.
274
+
271
275
The ``EncryptionSDKClient`` class is thread safe.
272
276
But instances of key material providers (i.e. keyrings or legacy master key providers) that call AWS KMS
273
277
(ex. ``AwsKmsKeyring`` or other KMS keyrings; ``BaseKmsMasterKeyProvider`` or children of this class)
@@ -284,8 +288,6 @@ Finally, while the ``CryptoMaterialsCache`` is thread safe,
284
288
sharing entries in that cache across threads needs to be done carefully
285
289
(see the !Note about partition name `in the API Docs <https://aws-encryption-sdk-python.readthedocs.io/en/latest/generated/aws_encryption_sdk.materials_managers.caching.html#aws_encryption_sdk.materials_managers.caching.CachingCryptoMaterialsManager>`_).
0 commit comments