Encrypting a Field Value
  • 21 Nov 2022
  • Dark
    Light
  • PDF

Encrypting a Field Value

  • Dark
    Light
  • PDF

Article Summary

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?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.