Introduction
The Haftaa.org API allows developers to integrate our security tools into their own applications. Our API is RESTful and returns JSON responses.
Authentication
Currently, our API is open and does not require authentication. However, we reserve the right to implement rate limiting or API keys in the future if necessary to maintain service quality.
Base URL
All API endpoints are relative to the base URL:
https://haftaa.org/api/v1/
Endpoints
Password Generator
Generate random passwords with customizable parameters.
POST /password/generate
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
length | integer | No (default: 12) | Length of the generated password (4-64) |
uppercase | boolean | No (default: true) | Include uppercase letters (A-Z) |
lowercase | boolean | No (default: true) | Include lowercase letters (a-z) |
numbers | boolean | No (default: true) | Include numbers (0-9) |
symbols | boolean | No (default: false) | Include symbols (!@#$% etc.) |
Example Request
POST https://haftaa.org/api/v1/password/generate
Content-Type: application/json
{
"length": 16,
"uppercase": true,
"lowercase": true,
"numbers": true,
"symbols": true
}
Example Response
{
"success": true,
"password": "gH7$kL2!pQ9@mN4#",
"strength": "very_strong",
"length": 16
}
Password Strength Checker
Check the strength of a password and get feedback.
POST /password/check
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
password | string | Yes | Password to check |
Example Request
POST https://haftaa.org/api/v1/password/check
Content-Type: application/json
{
"password": "myPassword123"
}
Example Response
{
"success": true,
"strength": "medium",
"score": 65,
"feedback": {
"length": "Good (12 characters)",
"complexity": "Contains letters and numbers",
"suggestion": "Add symbols and uppercase letters to increase strength"
}
}
Hash Generator
Generate cryptographic hashes from input text.
POST /hash/generate
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
text | string | Yes | Input text to hash |
algorithm | string | No (default: "sha256") | Hash algorithm (md5, sha1, sha256, sha512) |
Example Request
POST https://haftaa.org/api/v1/hash/generate
Content-Type: application/json
{
"text": "hello world",
"algorithm": "sha256"
}
Example Response
{
"success": true,
"algorithm": "sha256",
"hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"
}
Rate Limits
Currently, the API has no strict rate limits, but we reserve the right to implement them if necessary. Please use the API responsibly.
Terms of Use
By using our API, you agree to the following:
- The API is provided for free and "as is" without warranties of any kind
- We may change or discontinue the API at any time without notice
- Don't use the API for illegal purposes or to generate harmful content
- Excessive use may result in temporary or permanent access restrictions
Support
For API-related questions or issues, please contact us at contact@haftaa.org.