https://github.com/squidmin/java-cryptography-labs
https://github.com/squidmin/java-cryptography-labs
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/squidmin/java-cryptography-labs
- Owner: squidmin
- Created: 2024-04-25T02:44:26.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-25T05:04:46.000Z (about 2 years ago)
- Last Synced: 2025-02-07T13:54:02.508Z (over 1 year ago)
- Language: Java
- Size: 785 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# java-cryptography-labs
Java-based backend application built with Spring Boot. It provides robust API endpoints for encrypting and decrypting data using AES encryption standards. This application is designed to demonstrate secure cryptographic operations, suitable for educational purposes or as a base for more complex applications.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
- JDK 17 or higher
- Gradle 7.0 or higher
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/squidmin/java-cryptography-labs.git
cd java-cryptography-labs
./gradlew build
./gradlew bootRun
```
The server will start running on http://localhost:8080.
## Usage
The application provides the following RESTful endpoints:
- **POST /api/crypto/encrypt** - Takes plain text and returns the encrypted data.
- **POST /api/crypto/decrypt** - Takes encrypted text and returns the decrypted data.
You can use tools like Postman or cURL to interact with the API:
**Encrypt data**:
```bash
echo -n 'YourPlainText' | xargs -I {} curl -X POST http://localhost:8080/api/crypto/encrypt -H "Content-Type: text/plain" -d '{}'
```
**Decrypt data**:
```bash
echo -n 'YourEncryptedText' | xargs -I {} curl -X POST http://localhost:8080/api/crypto/decrypt -H "Content-Type: text/plain" -d '{}'
```
