Skip to content

Commit 69015fb

Browse files
pre-commit-ci[bot]ignacio-gn
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d91fc28 commit 69015fb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: ciphers/rsa_cipher.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,9 @@ def encrypt_and_write_to_file(
7878
sys.exit(
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. "
81-
"Either decrease the block size or use different keys."
82-
.format(block_size * 8, key_size)
81+
"Either decrease the block size or use different keys.".format(
82+
block_size * 8, key_size
83+
)
8384
)
8485

8586
encrypted_blocks = [str(i) for i in encrypt_message(message, (n, e), block_size)]
@@ -103,8 +104,9 @@ def read_from_file_and_decrypt(message_filename: str, key_filename: str) -> str:
103104
sys.exit(
104105
"ERROR: Block size is {} bits and key size is {} bits. The RSA cipher "
105106
"requires the block size to be equal to or greater than the key size. "
106-
"Did you specify the correct key file and encrypted file?"
107-
.format(block_size * 8, key_size)
107+
"Did you specify the correct key file and encrypted file?".format(
108+
block_size * 8, key_size
109+
)
108110
)
109111

110112
encrypted_blocks = []

0 commit comments

Comments
 (0)