Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6617db7

Browse files
committedMay 6, 2024·
fix
1 parent c82fc2f commit 6617db7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎examples/test/keyrings/test_i_file_streaming_example.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ def test_encrypt_and_decrypt_with_keyring():
1616
if not os.path.exists(test_keyrings_directory):
1717
os.makedirs(test_keyrings_directory)
1818

19+
# Define the filename of the plaintext data.
1920
plaintext_filename = test_keyrings_directory + '/my-secret-data.dat'
2021

22+
# Define the plaintext data to be encrypted and decrypted.
2123
plaintext_data = '''Lorem ipsum dolor sit amet, consectetur adipiscing elit.
2224
Praesent non feugiat leo. Aenean iaculis tellus ut velit consectetur,
2325
quis convallis orci eleifend. Sed eu dictum sapien. Nulla facilisi. Suspendisse potenti.
@@ -45,11 +47,16 @@ def test_encrypt_and_decrypt_with_keyring():
4547
Nullam id enim vestibulum nibh ultricies auctor. Morbi neque lacus, faucibus vitae commodo quis,
4648
malesuada sed velit.'''
4749

50+
# Write plaintext data to file
4851
with open(plaintext_filename, "w", encoding="utf-8") as f:
4952
f.write(plaintext_data)
5053

54+
# Define the filename of the encrypted data.
5155
ciphertext_filename = test_keyrings_directory + '/my-encrypted-data.ct'
56+
57+
# Define the filename of the decrypted data.
5258
new_plaintext_filename = test_keyrings_directory + '/my-decrypted-data.dat'
59+
5360
encrypt_and_decrypt_with_keyring(plaintext_filename,
5461
ciphertext_filename,
5562
new_plaintext_filename)

0 commit comments

Comments
 (0)
Please sign in to comment.