Related article: https://bit.ly/3WfKXWK
- Caesar cipher
- Vigenère cipher
- Bitwise rotation
- XOR encryption
Replace 'cipher' for the appropriate word.
To encrypt:
python3 cipher.py file_to_encrypt keyTo decrypt, use the '-d' flag (not necessary when using xor.py):
python3 cipher.py -d file_to_decrypt keyOptionally, you can specify the output file with '-o':
python3 cipher.py file_to_encrypt key -o output_fileTo see the help use '-h':
python3 cipher.py -hAlternatively, you can import the individual functions to play with them in your Python programs:
from cipher import cipherLastly, the key should be a string in the case of vigenere.py or xor.py, and an integer in the case of caesar.py and bitwise.py.