Search code examples
jmeterjmeter-4.0jmeter-3.2

How can we write some encryption methods in Jmeter using Bean shell Sampler?


I need some tips of how can we write some Java code in Jmeter using Bean shell Sampler to accomplish Encryption . Help on this highly useful!!


Solution

  • In JMeter 4 new features you can use a new function _digest to encrypt using the following algorithms:

    1. MD2
    2. MD5
    3. SHA-1
    4. SHA-224
    5. SHA-256
    6. SHA-384
    7. SHA-512

    for example:

    ${__digest(SHA-256,Felix qui potuit rerum cognoscere causas,mysalt,,)}