Encrypting a Field Value
- 21 Nov 2022
-
DarkLight
-
PDF
Encrypting a Field Value
- Updated on 21 Nov 2022
-
DarkLight
-
PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Encrypting a field value will take the value of the field and run it through an encryption technique. It will place the result back into the object that will be sent to the other system. It will also decrypt the response.
If you do not want to decrypt the response, use a different schema for the request and the response.
To encrypt a request, add the encrypt object with the appropriate type (currently AES only) and the key that should be used to encrypt/decrypt.
Example: Request Token Schema with Encrypted Field Value
"$id": "reqTokenSchema.json",
"properties": {
….
"Data": {
"type": "object",
"properties": {
"Data": {
"type": "string",
"encrypt": {
"type": "AES",
"key": "thisismykey"
},
"external_name": "Data"
}
},
"external_name": "Data"
} ….
},
"definitions": {}
}
REQUEST WITHOUT ENCRYPT
{
"Data": {
"returnStatus": false,
"RecordCount": 0,
"Data": "something random"
}
}
REQUEST ENCRYPTED
{
"Data": {
"returnStatus": false,
"RecordCount": 0,
"Data": "IcNev7McG3/8MOt8QaULRzkNjDdzUKwhf6vEqPZkhog="
}
Was this article helpful?