Encrypt
is a Python-based tool that allows you to encrypt and decrypt files in your current directory. Using the cryptography.fernet
library, it ensures secure encryption with generated keys, making it suitable for protecting sensitive files. The script also provides the ability to rename files with a prefix (e.g., locked-
) after encryption.
- File Encryption: Encrypts all files (except specified ones) in the current directory.
- File Decryption: Decrypts previously encrypted files.
- Key Management: Automatically generates and saves a key for encryption and decryption.
- Python 3.6 or later
cryptography
library (install it usingpip install cryptography
)
- Clone or download the repository containing the script.
- Ensure all files you want to encrypt or decrypt are in the same directory as the script.
- Run the script and follow the prompts.
-
Encrypt Files
- Choose option
1
when prompted. - Confirm the operation by entering
Y
ory
. - All eligible files will be encrypted and renamed with the
locked-
prefix.
- Choose option
-
Decrypt Files
- Choose option
2
when prompted. - The script will attempt to decrypt all encrypted files.
- Choose option
- A key file (
key.txt
) will be generated during the first run. - Ensure the
key.txt
file remains in the directory; it is required for decrypting files.
python cryptog.py
# Output:
# Şifrelemek (encrypt) [1]
# Şifre Çözmek (decrypt) [2]
# :
Şifrelemek (encrypt) [1]
Gerçekten şifrelemek istiyor musunuz? [Y]
# Output:
# Şifrelendi
Şifre Çözmek (decrypt) [2]
# Output:
# Şifre Çözüldü.
The following files are not encrypted or decrypted:
cryptog.py
key.txt
decrypt.py
encrypt.py
cryptog.exe
encrypt.exe
key.key
This project is licensed under the MIT License. See the LICENSE
file for details.
This script is provided for educational purposes. Use it responsibly. The author takes no responsibility for any damage or data loss resulting from the use of this script.