Skip to main content
Complete reference for all Hash Generator API endpoints, parameters, and response formats.

Base URL

https://api.sinaty.business/hash/

Endpoints Overview

MethodEndpointDescription
GET/hash/Generate hash with query parameters
POST/hash/Generate hash with JSON body

GET /hash/

Generate a hash using query parameters.

Query Parameters

ParameterTypeDefaultDescription
inputstringrequiredText to hash
algorithmstringsha256Hash algorithm
saltstringnoneSalt to prepend
iterationsinteger1Number of iterations (1-10000)
formatstringhexOutput format
uppercasebooleanfalseConvert to uppercase

Supported Algorithms

AlgorithmOutput LengthSecurity LevelUse Case
md532 charsLowLegacy compatibility
sha140 charsLowLegacy compatibility
sha25664 charsHighGeneral purpose
sha512128 charsVery HighHigh security
sha3-25664 charsHighModern alternative
sha3-512128 charsVery HighHigh security
blake2b25664 charsHighFast and secure
blake2b512128 charsVery HighFast and secure
whirlpool128 charsHighAlternative to SHA
ripemd16040 charsMediumBitcoin compatibility
crc328 charsNoneFast checksum
adler328 charsNoneFast checksum
fnv1a328 charsNoneFast hash
fnv1a6416 charsNoneFast hash

Format Options

FormatDescriptionExample
hexHexadecimal (default)a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
base64Base64 encodedpZFq1Av0IEAKQBFzPPt7GQ1ixlvwvNozW1snfZ2vFG4
binaryBinary representation101001011001000110100110110101000010111111010000100000010000000100101000000001000101110011001111101101111011000110010000110111010110001011000110101111000010111100110110100010001100101011010111110010011110110100110110111110001010001101110

Example Request

curl "https://api.sinaty.business/hash/?input=hello&algorithm=sha256&salt=mysalt&iterations=1000"

Response Format

{
    "input": "hello",
    "hash": "a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e",
    "algorithm": "sha256",
    "salt": "mysalt",
    "iterations": 1000,
    "format": "hex",
    "uppercase": false,
    "length": 64,
    "timestamp": "2024-01-15 10:30:00"
}

POST /hash/

Generate a hash using JSON body parameters.

Request Body

{
    "input": "hello world",
    "algorithm": "sha256",
    "salt": "mysalt",
    "iterations": 1000,
    "format": "hex",
    "uppercase": false
}

Example Request

curl -X POST "https://api.sinaty.business/hash/" \
  -H "Content-Type: application/json" \
  -d '{"input": "hello", "algorithm": "sha256", "salt": "mysalt", "iterations": 1000}'

Response Fields

FieldTypeDescription
inputstringOriginal input text
hashstringGenerated hash value
algorithmstringHash algorithm used
saltstringSalt used (if any)
iterationsintegerNumber of iterations performed
formatstringOutput format used
uppercasebooleanWhether output was converted to uppercase
lengthintegerLength of the hash in characters
timestampstringGeneration timestamp

Error Responses

Missing Input (400)

{
    "error": "Input parameter is required",
    "details": "Please provide the 'input' parameter"
}

Invalid Algorithm (400)

{
    "error": "Invalid algorithm specified",
    "details": "Supported algorithms: md5, sha1, sha256, sha512, sha3-256, sha3-512, blake2b256, blake2b512, whirlpool, ripemd160, crc32, adler32, fnv1a32, fnv1a64"
}

Invalid Iterations (400)

{
    "error": "Iterations must be between 1 and 10000",
    "details": "Requested iterations: 15000"
}

Invalid Format (400)

{
    "error": "Invalid format specified",
    "details": "Supported formats: hex, base64, binary"
}

HTTP Status Codes

CodeDescription
200Success - Hash generated
400Bad Request - Invalid parameters
500Internal Server Error

Rate Limits

No rate limits! You can make unlimited requests to our API.

Security Considerations

Algorithm Selection

Cryptographically Secure (Recommended for security):
  • sha256, sha512, sha3-256, sha3-512
  • blake2b256, blake2b512, whirlpool
Legacy (Not recommended for security):
  • md5, sha1 - Cryptographically broken
  • ripemd160 - Limited security
Non-Cryptographic (For data integrity only):
  • crc32, adler32, fnv1a32, fnv1a64 - Fast checksums

Salt Usage

Always use salt for:
  • Password hashing
  • Security-critical applications
  • User-generated content
Salt best practices:
  • Use unique salt per hash
  • Use at least 16 characters
  • Use cryptographically secure random salt
  • Store salt alongside hash

Iterations

Recommended iterations:
  • Passwords: 10,000+ iterations
  • API keys: 1,000+ iterations
  • General purpose: 1-100 iterations
  • Fast checksums: 1 iteration

Best Practices

Password Hashing

# Good - Secure password hashing
curl "https://api.sinaty.business/hash/?input=mypassword&algorithm=sha256&salt=unique_salt_123&iterations=10000"

# Avoid - Weak password hashing
curl "https://api.sinaty.business/hash/?input=mypassword&algorithm=md5"

Data Integrity

# Good - File checksum
curl "https://api.sinaty.business/hash/?input=file_content&algorithm=sha256"

# Good - Fast checksum for large files
curl "https://api.sinaty.business/hash/?input=file_content&algorithm=crc32"

API Security

# Good - Hash API key
curl "https://api.sinaty.business/hash/?input=api_key_123&algorithm=sha256&salt=app_salt&iterations=1000"

Performance Considerations

Algorithm Performance

Fastest to Slowest:
  1. crc32, adler32, fnv1a32, fnv1a64 (very fast)
  2. blake2b256, blake2b512 (fast)
  3. md5, sha1 (medium)
  4. sha256, sha512 (slower)
  5. sha3-256, sha3-512, whirlpool (slowest)

Large Input Handling

For large inputs:
  • Use POST requests instead of GET
  • Consider using faster algorithms for non-security-critical applications
  • Use fewer iterations for performance-sensitive operations

Error Handling

Always implement proper error handling:
async function generateHash(input, algorithm = 'sha256') {
    try {
        const response = await fetch(
            `https://api.sinaty.business/hash/?input=${encodeURIComponent(input)}&algorithm=${algorithm}`
        );
        
        if (!response.ok) {
            const error = await response.json();
            console.error('API Error:', error.error);
            console.error('Details:', error.details);
            return null;
        }
        
        const data = await response.json();
        return data.hash;
    } catch (error) {
        console.error('Request failed:', error);
        return null;
    }
}

Common Use Cases

Password Verification

async function verifyPassword(password, storedHash, salt) {
    const hash = await generateHash(password, 'sha256', salt, 10000);
    return hash === storedHash;
}

File Integrity Check

async function checkFileIntegrity(fileContent, expectedHash) {
    const hash = await generateHash(fileContent, 'sha256');
    return hash === expectedHash;
}

API Key Validation

async function validateApiKey(apiKey, storedHash) {
    const hash = await generateHash(apiKey, 'sha256', 'app_salt', 1000);
    return hash === storedHash;
}
I