Encryption API
The purpose of this encryption API is to provide an open API, which can be called via JavaScript for example executed in browser to securely encrypt PII like an email address so that it can be used as lookup identifier and logged without introducing PII.
The encryption algorithm produces a non-deterministic and authenticated ciphertext using AES-GCM
that is base64 URL encoded.
Request
The POST method API handles a JSON object with multiple key-value pairs. The key name remains unchanged and the value gets encrypted and returned.
The key and value have an optional maximum specified length that is configurable by pipeline.
HTTP-Method | POST |
---|---|
Content-Type |
|
Path |
|
Body |
JSON
|
Example |
JS
|
Response
The response body contains a JSON object, with all key-value pairs from the request, where the keys are left unchanged and the values are replaced with their respective encrypted values.
Content-Type |
|
Body |
JSON
|
HTTP Status Codes
200 | Success. Request was successfully processed. |
400 | Bad Request. The JSON body is invalid. |
404 | Not Found. Incorrect request method, path or pipeline does not exist. |
413 | Payload Too Large. The request headers, body or any key or value of the key-value pairs is larger than the configured maximum on the server. |
500 | Server error. |