A small python script implementing encryption, decryption and hacking of the most widespread encryption algorithms (Vigenere, Caesar, Vername).
Run the build.sh script to build the project. It will create the virtual environment, activate it and install all the needed pip packages:
./build.sh
./encryptor.py --help
- to display the help message.
Use this command to encode the text (read from stdio or a file) using the available ciphers and display the encrypted text or write it to a file.
Usage: encryptor.py encode [OPTIONS]
Options:
-c, --cipher [caesar|vigenere|vernam]
-- Cipher type: Caesar, Vigenere or Vernam. [required]
-k, --key TEXT
-- The key: integer for Caesar, string for Vigenere and Vernam. [required]
--input-file FILENAME
-- The input file to read the text from.
--output-file FILENAME
-- Output file to write the text to.
Use this command to decode the text (read from stdio or a file) using the available ciphers and display the encrypted text or write it to a file.
Usage: encryptor.py decode [OPTIONS]
Options:
-c, --cipher [caesar|vigenere|vernam]
Cipher type: Caesar, vigenere or Vernam [required]
-k, --key TEXT
The key: integer for Caesar, string for Vigenere and Vernam. [required]
--input-file FILENAME
The input file to read the text from.
--output-file FILENAME
Output file to write the text to.
- Encryption and decryption using the following ciphers:
- Caesar cipher
- Vegenere cipher
- Vernam cipher
- The characters allowed to use (e.g. that will be encrypted) are. The rest of the characters will be escaped and left unchanged:
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZабвгдеёжзийклмнопрстуфхцчшщъыьэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ1234567890!"#$%&'()*+,-./:;<=>?@[\\]^_ `{|}~
pytest