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:
Christian Clauss
2020-05-01 23:36:35 +02:00
committed by GitHub
parent bcaa88b26c
commit 6acd7fb5ce
19 changed files with 161 additions and 82 deletions

View File

@@ -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)
)