In one of the http request we have to send encrypted value.
The encryption is done by the CryptoJs javascript libraries and Algorithm used is AES256.
I am new to Jmeter can anyone let me know how to import the CryptoJs libraries and how to use the function of same to encrypt and decrypt the same.
I recall answering something similar already, see How to load external js library in Jmeter?
Quoting myself:
Use Rhino load() method like:
load("crypto.js")
Given the guy wasn't able to use the instruction here is a little bit extended version:
Download the required version of CryptoJS from the releases page and unpack it somewhere
Using load
method provide full path to crypto-js.js
file like:
/tmp/crypto-js-3.1.7/crypto-js.js
Access methods like
Demo:
If the values are static and you don't have a lot of them a better idea could be storing them into a file and accessing via i.e. CSV Data Set Config