mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
Reenable files when TensorFlow supports the current Python (#11318)
* Remove python_version < '3.12' for tensorflow * Reenable dynamic_programming/k_means_clustering_tensorflow.py * updating DIRECTORY.md * Try to fix ruff * Try to fix ruff * Try to fix ruff * Try to fix ruff * Try to fix ruff * Reenable machine_learning/lstm/lstm_prediction.py * updating DIRECTORY.md * Try to fix ruff * Reenable computer_vision/cnn_classification.py * updating DIRECTORY.md * Reenable neural_network/input_data.py * updating DIRECTORY.md * Try to fix ruff * Try to fix ruff * Try to fix mypy * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Try to fix ruff * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: MaximSmolskiy <MaximSmolskiy@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -76,11 +76,9 @@ def encrypt_and_write_to_file(
|
||||
key_size, n, e = read_key_file(key_filename)
|
||||
if key_size < block_size * 8:
|
||||
sys.exit(
|
||||
"ERROR: Block size is {} bits and key size is {} 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.".format(
|
||||
block_size * 8, key_size
|
||||
)
|
||||
f"ERROR: Block size is {block_size * 8} bits and key size is {key_size} "
|
||||
"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."
|
||||
)
|
||||
|
||||
encrypted_blocks = [str(i) for i in encrypt_message(message, (n, e), block_size)]
|
||||
@ -102,11 +100,10 @@ def read_from_file_and_decrypt(message_filename: str, key_filename: str) -> str:
|
||||
|
||||
if key_size < block_size * 8:
|
||||
sys.exit(
|
||||
"ERROR: Block size is {} bits and key size is {} 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?".format(
|
||||
block_size * 8, key_size
|
||||
)
|
||||
f"ERROR: Block size is {block_size * 8} bits and key size is {key_size} "
|
||||
"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?"
|
||||
)
|
||||
|
||||
encrypted_blocks = []
|
||||
|
Reference in New Issue
Block a user