Hello, it seems that this question still hasn’t been answered. I have worked a lot and can't solve the problem, but I found a temporary solution that might help you. I am using workflows to decrypt.
The process is a bit elaborate, but I really think it's something simple:
Create a workflow in Architect (it must be a workflow-type flow).
Create 2 variables: one for input and another for output (you have to mark them as input and output).
Use the decrypt block and assign the two variables, one with the input data and another with the output data.
Use the following 2 APIs to execute an instance of the flow and the other to get the result:
With this, you will be able to obtain the decrypted data. Obviously, you need to write the authentication code and what will consume those 2 endpoints, but I didn't take more than 200 lines of code.
I forgot to mention that in the payload of the first API, you need to send the encrypted data like this:
let body = {
"flowId": "id_of_your_workflow",
"inputData": {
"Flow.encrypted_data": encryptedData
}
}
It must have the same name as the variable in the workflow for it to recognize it.