Complete reference for the Cipher API - cryptographic utilities for developers.
Get started with the Cipher API in minutes. All endpoints require authentication with an API key.
Include your API key in the x-api-key header.
// Include your API key in the x-api-key header
headers: {
'x-api-key': 'ek_your_api_key_here',
'Content-Type': 'application/json'
}curl -X POST https://cipher.endpnt.dev/api/v1/hash \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"data": "Hello, World!",
"algorithm": "sha256"
}'{
"success": true,
"data": {
"hash": "dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f",
"algorithm": "sha256",
"input_length": 13
},
"meta": {
"request_id": "req_abc123",
"processing_ms": 2,
"remaining_credits": 4999
}
}We never log your secrets, keys, or sensitive data. All cryptographic operations are performed in memory and results are returned immediately. However, always use environment variables or secure key management for your API keys and secrets.
Generate cryptographic hashes using various algorithms for data integrity and verification.
Generate a cryptographic hash of the provided data.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"hash": "dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f",
"algorithm": "sha256",
"input_length": 13
},
"meta": {
"request_id": "req_abc123",
"processing_ms": 2,
"remaining_credits": 4999
}
}Generate and verify Hash-based Message Authentication Codes for message integrity and authentication.
Generate an HMAC signature for the provided data and secret.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"signature": "f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8",
"algorithm": "sha256"
},
"meta": {
"request_id": "req_def456",
"processing_ms": 1
}
}Verify an HMAC signature against the provided data and secret.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"valid": true,
"algorithm": "sha256"
},
"meta": {
"request_id": "req_ghi789",
"processing_ms": 1
}
}Sign, verify, and decode JSON Web Tokens for authentication and authorization.
Create and sign a JWT token with the provided payload and secret.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": "1h",
"algorithm": "HS256"
},
"meta": {
"request_id": "req_jkl012",
"processing_ms": 3
}
}Verify a JWT token's signature and decode its payload.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"valid": true,
"payload": {
"user_id": "12345",
"role": "admin",
"iat": 1670966400,
"exp": 1670970000
},
"algorithm": "HS256"
},
"meta": {
"request_id": "req_mno345",
"processing_ms": 2
}
}Decode a JWT token without signature verification.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"header": {
"alg": "HS256",
"typ": "JWT"
},
"payload": {
"user_id": "12345",
"role": "admin",
"iat": 1670966400,
"exp": 1670970000
}
},
"meta": {
"request_id": "req_pqr678",
"processing_ms": 1
}
}Secure password hashing and verification using bcrypt with configurable cost factors.
Generate a secure bcrypt hash of a password.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"hash": "$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LeNNoIZtHHwS3UWKe",
"cost": 12
},
"meta": {
"request_id": "req_stu901",
"processing_ms": 85
}
}Verify a password against a bcrypt hash.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"valid": true,
"cost": 12
},
"meta": {
"request_id": "req_vwx234",
"processing_ms": 82
}
}Generate cryptographically secure random data, tokens, and UUIDs.
Generate cryptographically secure random data in various formats.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"value": "a3f5d9e8b2c1f4e7a9d6c3b8f2e5a1d7c9b6f3e8a2d5c7b1f9e4a8d3c6b2f5e9",
"type": "hex",
"length": 32
},
"meta": {
"request_id": "req_yza567",
"processing_ms": 1
}
}Generate UUIDs in different versions and formats.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"version": "v4"
},
"meta": {
"request_id": "req_bcd890",
"processing_ms": 1
}
}Encode and decode data in various formats including Base64, hex, and URL-safe variants.
Encode text data in various formats.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"encoded": "SGVsbG8sIENpcGhlciBBUEkh",
"encoding": "base64",
"input_length": 18
},
"meta": {
"request_id": "req_efg123",
"processing_ms": 1
}
}Decode encoded data back to its original form.
API Key Required
This endpoint requires authentication. Enter your API key to test.
{
"success": true,
"data": {
"decoded": "Hello, Cipher API!",
"encoding": "base64",
"output_length": 18
},
"meta": {
"request_id": "req_hij456",
"processing_ms": 1
}
}The API returns standard HTTP status codes and specific error codes in the response body.