Encrypts a string, a number, an object or an array and answers the encrypted text. By default it uses encryptionAlgorithmFETransfer and secretFETransfer of the default secret : the key you share with your frontend or mobile app, so the two sides can exchange encrypted data.
Method
POST
URL
/api/system-api/admin/encrypt-data : admin is the user path of your account
consttext=awaitg.sys.system.encrypt({name:'Joseph'});// with the transfer key of the secretconstmine=awaitg.sys.system.encrypt('hello',T.EEncryptionAlgorithm.AES,'my-own-key');
Over HTTP, a system API answers once its settings give it apiAccessType: TOKEN_ACCESS (the token of an API user whose group grants this system API, in x-am-authorization) or IS_PUBLIC. Without settings it is NO_ACCESS : your code calls it through g.sys, the admin panel tests it, and an HTTP call is refused.
The settings can also cache the answer or require person tokens (authProviders) ; pre and post hooks run around it like around any API.
The request headers apply : x-am-response-case, x-am-content-type-response, x-am-internationalization, x-am-tenant-username…