Skip to content

Encrypt data

To Encrypt data using the encrypt-data system API.

  • User can encrypt any string, object, array, number.
  • In response, we got encrypted string.

Request method: POST

Note: The secret contains the encryption algorithm name in 'encryptionAlgorithmFETransfer' key.

URL

/api/system-api/user-path/encrypt-data

Request payload

{
    "name": "Joseph"
}

Get encrypted data using global object 'g'.

let encryptedData = await g.sys.system.encrypt({ "Name": "Bob" });

API Response

{
    "success": true,
    "statusCode": 200,
    "data": "U2FsdGVkX19iIBA3FQy3OgFXeE4B2cC8lAfaJjCbMmUllceqb58YwvQqU33PkQEQ"
}