File tree 1 file changed +7
-0
lines changed 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ def test_encrypt_and_decrypt_with_keyring():
16
16
if not os .path .exists (test_keyrings_directory ):
17
17
os .makedirs (test_keyrings_directory )
18
18
19
+ # Define the filename of the plaintext data.
19
20
plaintext_filename = test_keyrings_directory + '/my-secret-data.dat'
20
21
22
+ # Define the plaintext data to be encrypted and decrypted.
21
23
plaintext_data = '''Lorem ipsum dolor sit amet, consectetur adipiscing elit.
22
24
Praesent non feugiat leo. Aenean iaculis tellus ut velit consectetur,
23
25
quis convallis orci eleifend. Sed eu dictum sapien. Nulla facilisi. Suspendisse potenti.
@@ -45,11 +47,16 @@ def test_encrypt_and_decrypt_with_keyring():
45
47
Nullam id enim vestibulum nibh ultricies auctor. Morbi neque lacus, faucibus vitae commodo quis,
46
48
malesuada sed velit.'''
47
49
50
+ # Write plaintext data to file
48
51
with open (plaintext_filename , "w" , encoding = "utf-8" ) as f :
49
52
f .write (plaintext_data )
50
53
54
+ # Define the filename of the encrypted data.
51
55
ciphertext_filename = test_keyrings_directory + '/my-encrypted-data.ct'
56
+
57
+ # Define the filename of the decrypted data.
52
58
new_plaintext_filename = test_keyrings_directory + '/my-decrypted-data.dat'
59
+
53
60
encrypt_and_decrypt_with_keyring (plaintext_filename ,
54
61
ciphertext_filename ,
55
62
new_plaintext_filename )
You can’t perform that action at this time.
0 commit comments