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
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:
- Check this question to find out how to deal with AES in Java: Java aes encrypt decrypt example
- Add JSR223 Sampler to JMeter Test Plan, choose
Java Beanshell Engine
in it'sLanguage
option and use The Java Power to crypt your JSON. - Check more information about advanced usage of BeanShell
-
-
@indikakariyawasam If this solve your question, you may accept this answer and upvote it, as correct. Thank you! Commented Feb 14, 2019 at 9:26