API Documentation

Welcome to the API documentation. Below you will find detailed information about the available endpoints, their usage, and example requests and responses.

1. Authentication

Endpoint: /api/auth

Method: POST

Input:

{
  "client_id": "example_client",
  "client_secret": "example_secret"
}

Output:

{
  "token": "jwt_token"
}

2. Generate Keys and Patterns

Endpoint: /api/generate

Method: POST

Header: Authorization: Bearer <jwt_token>

Output:

{
  "session_id": "unique_session_id",
  "salt": "base64_encoded_salt",
  "pattern": "random_pattern"
}

3. Validate Data Integrity

Endpoint: /api/validate

Method: POST

Input:

{
  "session_id": "unique_session_id",
  "encrypted_data": "base64_encoded_data"
}

Output:

{
  "decrypted_data": "original_data"
}

4. End Session

Endpoint: /api/logout

Method: POST

Input:

{
  "session_id": "unique_session_id"
}

Output:

{
  "message": "Session cleared"
}

Interactive Swagger UI

Below is an interactive Swagger UI interface for testing the API: