mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Wrap lines that go beyond GitHub Editor (#1925)
* Wrap lines that go beyond GiHub Editor
* flake8 --count --select=E501 --max-line-length=127
* updating DIRECTORY.md
* Update strassen_matrix_multiplication.py
* fixup! Format Python code with psf/black push
* Update decision_tree.py
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import sys, rsa_key_generator as rkg, os
|
||||
import os
|
||||
import sys
|
||||
|
||||
import rsa_key_generator as rkg
|
||||
|
||||
DEFAULT_BLOCK_SIZE = 128
|
||||
BYTE_SIZE = 256
|
||||
@@ -92,7 +95,9 @@ def encryptAndWriteToFile(
|
||||
keySize, n, e = readKeyFile(keyFilename)
|
||||
if keySize < blockSize * 8:
|
||||
sys.exit(
|
||||
"ERROR: Block size is %s bits and key size is %s bits. The RSA cipher requires the block size to be equal to or greater than the key size. Either decrease the block size or use different keys."
|
||||
"ERROR: Block size is %s bits and key size is %s bits. The RSA cipher "
|
||||
"requires the block size to be equal to or greater than the key size. "
|
||||
"Either decrease the block size or use different keys."
|
||||
% (blockSize * 8, keySize)
|
||||
)
|
||||
|
||||
@@ -117,7 +122,9 @@ def readFromFileAndDecrypt(messageFilename, keyFilename):
|
||||
|
||||
if keySize < blockSize * 8:
|
||||
sys.exit(
|
||||
"ERROR: Block size is %s bits and key size is %s bits. The RSA cipher requires the block size to be equal to or greater than the key size. Did you specify the correct key file and encrypted file?"
|
||||
"ERROR: Block size is %s bits and key size is %s bits. The RSA cipher "
|
||||
"requires the block size to be equal to or greater than the key size. "
|
||||
"Did you specify the correct key file and encrypted file?"
|
||||
% (blockSize * 8, keySize)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user