https://www.npmjs.com/package/node-forge
"Forge uses a CommonJS module structure with a build process for browser bundles."
https://www.ibm.com/support/knowledgecenter/SS9H2Y_7.7.0/com.ibm.dp.doc/gatewayscript_model.html
Gateway script includes ECMAScript, CommonJS, and DataPower-specific GatewayScript APIs.
You should be able to use Forge with GatewayScript because of CommonJS.
------------------------------
Hermann Stamm-Wilbrandt
Compiler Level 3 support & Fixpack team lead
IBM DataPower Gateways (⬚ᵈᵃᵗᵃ / ⣏⠆⡮⡆⢹⠁⡮⡆⡯⠂⢎⠆⡧⡇⣟⡃⡿⡃)
------------------------------
Original Message:
Sent: Wed April 01, 2020 01:25 PM
From: santhosh yelimineti
Subject: Encryption using the cert from JSON body
Do we have any methods to encrypt the payload using the certificate which is coming in the JSON payload or Header etc.
1. XSLT via dp extension function?
2.Gateway Scripts ?.
is this possible ?.
i have looked at "node-forge". I couldn't contemplate how we can use this kind of scripts in datapower
------------------------------
santhosh
------------------------------