This Python script provides a basic encryption and decryption mechanism for words. It's designed for demonstration purposes and includes customizable prefixes and suffixes.
- Encryption: Transforms a word by moving the first character to the end, converting it to lowercase, and appending a predefined prefix and suffix.
- Decryption: Reverses the encryption process to retrieve the original word.
- Handles words shorter than 3 characters by simply reversing them.
-
Encrypt:
- Adds a prefix (
"axt") and suffix ("lqz") to the modified word. - Example:
"Hello"→"axtellohqlz"
- Adds a prefix (
-
Decrypt:
- Removes the prefix and suffix to restore the original word.
- Example:
"axtellohqlz"→"Hello"
- Python 3.x installed on your system.
- Clone the repository:
git clone https://github.com/prashh129/decode.git
- Navigate to the directory:
cd decode - Run the script:
python3 script_name.py
- Follow the prompts:
- Enter
"code"to encrypt a word. - Enter
"decode"to decrypt a word. - Enter the word when prompted.
- Enter
Input:
Enter if you want to Code or Decode: code
Enter the word you want to encrypt: Hello
Output:
Your encrypted word is: axtellohqlz
Input:
Enter if you want to Code or Decode: decode
Enter the word you want to decrypt: axtellohqlz
Output:
Your decrypted word is: Hello
- Words shorter than 3 characters are reversed during both encryption and decryption.
- Input validation ensures that empty words are not accepted.
This project does not have a license. All rights are reserved. If you would like to use this code, please contact the repository owner for permission.
Thanks for checking out this project! If you have any feedback or questions, please feel free to open an issue or contact me directly.