I am currently working on testing the REST API and need to send some request in JSON format to a server which I am testing through JMeter.So, how can I send the encrypted request by AES encryption instead of the plain text transmission using JMeter? I have the key and IV

1 Answer 1


Out of the box JMeter can use __digest() function to return encrypted value using algorithms:

  • MD2
  • MD5
  • SHA-1
  • SHA-224
  • SHA-256
  • SHA-384
  • SHA-512

But there are no AES support by default. To be able work with it follow this steps:

  1. Check this question to find out how to deal with AES in Java: Java aes encrypt decrypt example
  2. Add JSR223 Sampler to JMeter Test Plan, choose Java Beanshell Engine in it's Language option and use The Java Power to crypt your JSON.
  3. Check more information about advanced usage of BeanShell
  • You are welcome! Feb 14, 2019 at 9:26
  • @indikakariyawasam If this solve your question, you may accept this answer and upvote it, as correct. Thank you! Feb 14, 2019 at 9:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.