Encrypt Data
This API encrypts plaintext using an existing encryption configuration. The encryption configuration is identified by its unique ID, and the API returns the encrypted ciphertext.
Endpoint Details
| URL | /v1/crypto/encrypt |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Body
Use the following format to make a request:
JSON Request
{
"function_id": "74b1d868-4210-41c0-ab20-3cabb574ebca",
"plaintext": "testing"
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| function_id | String | Unique identifier of the encryption configuration used to perform encryption |
| plaintext | String | Plaintext data to be encrypted |
Response
Here is an example response after the request has been successfully processed:
Response
{
"ciphertext": "v1:OOeoBdaePUGTTWwwl7C/Am3yx/zugui9S5AqdNwxN4qgDAhrAXegJXtqRBpA+36fRdcFgs8ogWl256T6aZ1eqKNMvRlh8kkgwzUd0AZPsjGKAjMHHF6mHkCas8pueViKAauFwwUBKD6kDllFSu6rs20OZtF0WnqOwxj1B3t8ZaI="
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| ciphertext | String | Encrypted output generated from the provided plaintext using the specified encryption configuration |
info
- A valid Bearer Token is required to access this endpoint.
- The
function_idmust refer to an existing encryption configuration. - The returned
ciphertextshould be preserved exactly as received because it is required for the corresponding decryption operation.