A modern Java Swing application for secure file encryption and decryption using AES.
- Features
- Requirements
- Project Structure
- Setup & Build
- Running the Application
- Running Unit Tests
- Usage Guide
- Security Notes
- Screenshots
- License
- Modern, visually appealing light-themed UI
- Encrypt and decrypt files with a user-provided passphrase (min 16 chars)
- Secure key management (no hardcoded keys)
- Input validation for file and passphrase
- Progress bar and status messages for long operations
- Logging of encryption/decryption events and errors
- File overwrite protection with user confirmation
- Unit tests for encryption/decryption logic
- Java 8 or higher
- Maven (for building and running tests)
FileEncryptionTool/
├── pom.xml
├── README.md
├── src/
│ ├── encryption/
│ │ ├── EncryptionHandler.java
│ │ └── EncryptionHandlerTest.java
│ └── ui/
│ └── EncryptionToolUI.java
- Clone or download this repository.
- Open a terminal in the project root directory.
- Build the project:
mvn clean compile
You can run the UI directly using Maven:
mvn exec:java -Dexec.mainClass="ui.EncryptionToolUI"
Or, compile and run manually:
javac -d out src/encryption/EncryptionHandler.java src/ui/EncryptionToolUI.java
java -cp out ui.EncryptionToolUI
To run the unit tests:
mvn test
- Launch the application.
- Click Upload File and select the file you want to encrypt or decrypt.
- Enter a secure passphrase (at least 16 characters).
- Click Encrypt or Decrypt as needed.
- If the output file already exists, you will be prompted to confirm overwriting.
- Status and progress will be shown at the bottom of the window.
- The encrypted file is saved in the same directory as the original, prefixed with
encrypted_
. Decrypted files are prefixed withdecrypted_
.
- The passphrase is never stored or logged.
- Use a strong, unique passphrase for each file.
- Encrypted files are saved with the prefix
encrypted_
, and decrypted files withdecrypted_
. - The tool uses AES encryption with a 16-byte key derived from your passphrase.

MIT License