Hi Hoc.Tran,
Could you please help me to execute your code?
I tried to execute your code in the Postmans Pre-request script but it is not working.
It is having a syntax error and when the syntax error is resolved, JSEncrypt is not defined error is coming.