Skip to content

Encrypt data

To Encrypt data using the encrypt-data system API.

  • The user can encrypt any string, object, array, or number.
  • In response, we got an encrypted string.

Request method: POST

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

URL

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

Request payload

{
    "data": {
        "name": "Joseph"
    }
}

Encrypt System API

Get encrypted data using global object 'g'.

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

API Response

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