/decrypt Endpoint
The /decrypt
endpoint reverses the encryption performed by the /encrypt
endpoint, restoring the original plaintext.
📤 Request
POST https://api.epochlock.com/decrypt
🔐 Required Headers
X-TIMESTAMP
: Client-side UNIX timestamp in millisecondsX-API-KEY
: SHA-256 hash of the timestamp + secretX-EMAIL
: Your EpochLock account email
📝 JSON Body Parameters
- encrypted (string): The base64 encrypted string returned from
/encrypt
- timestamp (string): The same timestamp used in the encryption process
- entropy (integer): The entropy value returned by the encryption process
📥 Response
Returns JSON containing:
decrypted
: The original plaintext string
{
"decrypted": "This is a secret"
}
❌ Error Responses
403
- Invalid API key or mismatched timestamp/entropy429
- Rate limit exceeded400
- Missing required fields
📚 Next Step:
See Examples for full code samples in multiple languages.