Skip to content

Commit de13a9a

Browse files
rohan472000ignacio-gn
authored andcommitted
Update rsa_cipher.py by replacing %s with {}
1 parent 41220e7 commit de13a9a

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
@@ -76,7 +76,7 @@ def encrypt_and_write_to_file(
7676
key_size, n, e = read_key_file(key_filename)
7777
if key_size < block_size * 8:
7878
sys.exit(
79-
"ERROR: Block size is %s bits and key size is %s bits. The RSA cipher "
79+
"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."
8282
% (block_size * 8, key_size)
@@ -101,7 +101,7 @@ def read_from_file_and_decrypt(message_filename: str, key_filename: str) -> str:
101101

102102
if key_size < block_size * 8:
103103
sys.exit(
104-
"ERROR: Block size is %s bits and key size is %s bits. The RSA cipher "
104+
"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?"
107107
% (block_size * 8, key_size)

0 commit comments

Comments
 (0)