Decrypt data using KMS SDK

Hi,

I encrypt the data inside the architect and send it to a third-party system.

I cannot decrypt the data encrypted by the architect using the same key that the Encrypt block used for encryption.

Does anyone know how I can decrypt the data that I receive encrypted by the architect using C# and the AWS SDK?

Can you share how I should pass the parameters to the AWS SDK to decrypt the data?

Regards,
Victor

1 Like

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:

  1. Create a workflow in Architect (it must be a workflow-type flow).
  2. Create 2 variables: one for input and another for output (you have to mark them as input and output).
  3. Use the decrypt block and assign the two variables, one with the input data and another with the output data.
  4. Use the following 2 APIs to execute an instance of the flow and the other to get the result:

/api/v2/flows/executions
/api/v2/flows/executions/id_of_your_workflow

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.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.