Send encrypted data AES_256_CBC

Hello, i need to send json array encrypted with AES_256_CBC then my API will retrieve this data and send to DB. Is it possible, using postman, send data encrypted in AES_256_CBC?

Thank you very much
Ivan

Hi @ivantnt, Welcome to the community!

You can use the CryptoJs library of the postman to convert string data to AES encrypted data.

For example

const encryptedText = CryptoJS.AES.encrypt('message', 'secret').toString();
console.log(encryptedText);

This you can add to your pre-request script to update the request body with encrypted data.

Hope this helps :slight_smile:

Hi , thank you for your reply, but how to test exactly my API?

In postman i have my json data in “Body”, and maybe i have to put your code in “Pre-request Script”, but how to pass my json to the script when i click the “SEND” button?

After that i would see the same json data in the response.

Sorry if i’m not completly clear.
Ivan

@ivantnt Please check if Postman Echo API’s are helpful in that case :blush: