This is a Java-based Spring Boot web application that allows users to:
- Convert text to Morse code.
- Convert Morse code to text.
- Encrypt text using AES 256-bit encryption.
- Decrypt AES-encrypted text.
The application is built using Spring Boot, Thymeleaf, and Java AES encryption techniques. The UI is simple and responsive, with forms to input text, Morse code, and encryption keys.
- Features
- Technologies Used
- Installation
- Running the Application
- Project Structure
- Usage
- Visual References
This application provides the following features:
- Text to Morse Code: Enter any text to be translated into Morse code.
- Morse Code to Text: Input Morse code to translate it back to text.
- AES 256-bit Encryption: Encrypt text with a key of any length using AES encryption (key is padded to 16, 24, or 32 bytes).
- AES Decryption: Decrypt AES-encrypted text with the same key.
- Java: Backend logic using Spring Boot framework.
- Spring Boot: Simplified development of REST APIs and web applications.
- Thymeleaf: Server-side template engine for rendering HTML views.
- AES 256-bit Encryption: For secure encryption and decryption of text.
- Bootstrap: For simple and responsive styling of the frontend.
To run this project locally, follow these steps:
- Java 11 or higher installed.
- Apache Maven installed.
- A modern web browser.
git clone https://github.com/your-username/morse-code-aes-encryption.git
cd morse-code-aes-encryption
mvn clean install
mvn spring-boot:run
Alternatively, you can run the JAR file:
java -jar target/morse-code-aes-encryption-0.0.1-SNAPSHOT.jar
Once the application is running, open a browser and navigate to:
http://localhost:8080
You will be presented with a simple web interface where you can:
- Convert text to Morse code.
- Convert Morse code back to text.
- Encrypt text using AES encryption.
- Decrypt AES-encrypted text.
src/
└── main/
├── java/
│ └── com/example/morsecode/
│ ├── AES256Util.java # Utility class for AES encryption/decryption
│ ├── MorseCodeApplication.java # Main Spring Boot application class
│ ├── MorseCodeController.java # Controller handling user requests
│ └── MorseCodeTranslator.java # Logic for converting text to/from Morse code
├── resources/
│ ├── static/ # Static resources (CSS, JS, etc.)
│ └── templates/ # Thymeleaf templates
│ ├── index.html # Main page for input forms
│ ├── result.html # Result page for text to Morse code conversion
│ ├── morseToTextResult.html # Result page for Morse code to text conversion
│ ├── encryptedResult.html # Result page for AES encryption
│ └── decryptedResult.html # Result page for AES decryption
└── application.properties # Application configuration file
To convert text to Morse code:
- Open the web page.
- Enter your text into the Text to Morse Code input field.
- Click the Translate to Morse Code button.
- The result will display the corresponding Morse code.
To convert Morse code to text:
- Input your Morse code (use
/
for spaces between words). - Click Translate Morse to Text.
- The result will show the translated text.
To encrypt text:
- Enter the text you want to encrypt in the AES Encryption section.
- Provide a key of any length (it will be padded to a valid AES length).
- Click the Encrypt Text button to get the encrypted result.
To decrypt text:
- Enter the AES-encrypted text in the AES Decryption section.
- Provide the same key used for encryption.
- Click Decrypt Text to retrieve the original text.
Contributions are welcome! Please follow these steps to contribute:
- Fork the repository.
- Create a new feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add new feature'
). - Push the branch to your fork (
git push origin feature/new-feature
). - Open a Pull Request.