This Python-based tool allows you to encrypt and decrypt text files using a Caesar cipher method. It provides a simple interface for securing your text data by shifting characters based on a secret key.
- Text Encryption: Encrypts plain text files by shifting characters using a randomly generated key.
- Text Decryption: Decrypts previously encrypted text files using the provided secret key.
- Clipboard Integration: Optionally copies decrypted text directly to your clipboard for easy access.
- Local File Management: Handles files within local directories, avoiding the need for absolute paths.
-
Python 3.x: Ensure Python is installed on your system.
-
Required Libraries: Install the necessary Python libraries using the following command:
pip install pyperclip
-
Clone the Repository:
git clone https://github.com/ArielBaron/encrypter-Decrypter.git cd encrypter-Decrypter
-
Directory Structure:
The project uses the following local directories:
./FileForDorE
: Main directory containing files to be encrypted../Encrypted Files
: Directory where encrypted files are stored../Decrypted Files
: Directory where decrypted files are stored.
Ensure these directories exist or create them as needed.
-
Run the Script:
python Encrypter.py
-
Follow the Prompts:
-
Select Folder: Choose the folder containing the file you wish to process:
0
for Main Directory (./FileForDorE
)1
for Encrypted Directory (./Encrypted Files
)
-
Enter File Name: Provide the name of the file to encrypt or decrypt.
-
Choose Mode:
1
orE
for Encryption2
orD
for Decryption
-
Encryption:
- A random key between 1 and 110,000 is generated.
- The file is encrypted and saved in the
./Encrypted Files
directory. - The encryption key is displayed; store it securely for decryption.
-
Decryption:
- Enter the secret key used during encryption.
- The file is decrypted and saved in the
./Decrypted Files
directory. - Optionally, copy the decrypted text to your clipboard by responding with
y
when prompted.
-
- File Paths: The script uses relative paths for file operations, ensuring compatibility across different systems.
- Clipboard Functionality: The
pyperclip
library is used for clipboard operations. Ensure it is installed and functioning on your system. - Security: The Caesar cipher is a basic encryption method and may not provide strong security for sensitive data. Use with caution and consider more robust encryption methods for critical information.