This C++ program provides encryption and decryption functionalities using a simple shift cipher (Caesar cipher). It allows users to: β Encrypt text π β Decrypt text π β Determine the shift key π β Attempt decryption without a known key π‘
- π Encryption (Crypt): Encrypts a given text using a specified key.
- π Decryption (UnCrypt): Decrypts an encrypted text using a specified key.
- π΅οΈ Determine Shift Key: Finds the encryption key by comparing original and encrypted text.
- π Brute-Force Decryption: Attempts decryption by trying all possible shift keys.
Run the program and select an option: 1οΈβ£ Encrypt Text: Enter a switch key and the text to encrypt. 2οΈβ£ Decrypt Text: Enter a switch key and the text to decrypt. 3οΈβ£ Find Shift Key: Provide an encrypted and decrypted text to determine the shift key. 4οΈβ£ Brute-Force Decryption: Enter an encrypted text and see all possible decrypted results.
To compile the program using g++, run:
g++ -o cryptography_tool main.cpp
To execute:
./cryptography_tool
Enter Switch Key: 3
Please enter text: Hello123
Encrypted: Khoor456
Enter Switch Key: 3
Please enter text: Khoor456
Decrypted: Hello123
Please enter Crypt Text: Khoor456
Please enter UnCrypt Text: Hello123
Switch Key: 3
Feel free to fork the repository and contribute improvements via pull requests. π
This project is open-source and free to use. π