10
10
11
11
def test_encrypt_and_decrypt_with_keyring_without_user_defined_keys ():
12
12
"""Test function for encrypt and decrypt using the Raw RSA Keyring example
13
- where user doesn't provide the public and private keys"""
13
+ where user doesn't provide the public and private keys
14
+ """
14
15
encrypt_and_decrypt_with_keyring ()
15
16
16
17
17
18
def test_encrypt_and_decrypt_with_keyring_with_user_defined_keys ():
18
19
"""Test function for encrypt and decrypt using the Raw RSA Keyring example
19
20
where user provides the public and private keys. To test this, we create the
20
- keys using the generate_rsa_keys function"""
21
+ keys using the generate_rsa_keys function
22
+ """
21
23
user_public_key , user_private_key = generate_rsa_keys ()
22
24
encrypt_and_decrypt_with_keyring (public_key = user_public_key , private_key = user_private_key )
23
25
@@ -26,7 +28,8 @@ def test_encrypt_and_decrypt_fails_if_user_provides_only_public_key():
26
28
"""Test function for encrypt and decrypt using the Raw RSA Keyring example
27
29
where user provides only the public key. The program should throw an Assertion error
28
30
as this example requires the user to either provide both private and public keys to
29
- test both encryption and decryption, or not provide any keys and the example generates both"""
31
+ test both encryption and decryption, or not provide any keys and the example generates both
32
+ """
30
33
user_public_key , user_private_key = generate_rsa_keys ()
31
34
try :
32
35
encrypt_and_decrypt_with_keyring (public_key = user_public_key )
@@ -40,7 +43,8 @@ def test_encrypt_and_decrypt_fails_if_user_provides_only_private_key():
40
43
"""Test function for encrypt and decrypt using the Raw RSA Keyring example
41
44
where user provides only the private key. The program should throw an Assertion error
42
45
as this example requires the user to either provide both private and public keys to
43
- test both encryption and decryption, or not provide any keys and the example generates both"""
46
+ test both encryption and decryption, or not provide any keys and the example generates both
47
+ """
44
48
user_public_key , user_private_key = generate_rsa_keys ()
45
49
try :
46
50
encrypt_and_decrypt_with_keyring (private_key = user_private_key )
0 commit comments