Guidline How to Using External Lib JSENScrypt in postman

  1. URL to get jsEncrypt lib:

  2. save URL at step 1 in global Varaible with name “jsEncrypt”;

  3. In Pre-request Script, write script as below:

    navigator  = {};
    window = {};
    pm.sendRequest(pm.globals.get("jsEncrypt"), (err, res) => {
    var text = res.text();
    (new Function(text))();
    var jsencrypt = new JSEncrypt.JSEncrypt({
            default_key_size: 4096
    jsencrypt.setKey( "// here is public key" );
    var result = jsencrypt.encrypt("// here is you clear value before you want to encrypt");

Hope can help you all.