Skip to content

Commit d91fc28

Browse files
rohan472000ignacio-gn
authored andcommitted
Update rsa_cipher.py
1 parent de13a9a commit d91fc28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: ciphers/rsa_cipher.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def encrypt_and_write_to_file(
7979
"ERROR: Block size is {} bits and key size is {} bits. The RSA cipher "
8080
"requires the block size to be equal to or greater than the key size. "
8181
"Either decrease the block size or use different keys."
82-
% (block_size * 8, key_size)
82+
.format(block_size * 8, key_size)
8383
)
8484

8585
encrypted_blocks = [str(i) for i in encrypt_message(message, (n, e), block_size)]
@@ -104,7 +104,7 @@ def read_from_file_and_decrypt(message_filename: str, key_filename: str) -> str:
104104
"ERROR: Block size is {} bits and key size is {} bits. The RSA cipher "
105105
"requires the block size to be equal to or greater than the key size. "
106106
"Did you specify the correct key file and encrypted file?"
107-
% (block_size * 8, key_size)
107+
.format(block_size * 8, key_size)
108108
)
109109

110110
encrypted_blocks = []

0 commit comments

Comments
 (0)