Cryptic is a Python CLI tool that encrypts and decrypts any type of files. The tool firstly tries to encrypt/decrypt the file as a text based file using the caesar cipher and if it throws an UnicodeDecodeError
exception, the tool detects that it is a byte based file and encrypt it using an encryption algorithm that reads the file line by line and add a specific byte line between every two successive lines and when the user tries to decrypt the file it removes the added specific byte lines from the file.
-
It is an empty file that makes Python deal the directory as a one package.
-
The main file and the file that runs the project. It fetchs the command line arguments and checks if the operation type is correct and also checks if the file is exists then run the required operation on the specified file.
-
It contains the encryption algorithm.
-
It contains the decryption algorithm.
-
It stores the global variables that are needed to get accessed from multiple files like
SHIFT_OFFSET
to avoid the circular dependency problem.
$ python cryptic.py --enc <filename>
$ python cryptic.py --dec <filename>