RE: Using SuiteScript to encrypt a string as JWE
Hi everyone, I have a question regarding JWS and JWE using SuiteScript. Perhaps someone here can help me with their previous experience.
I’m currently working on a script to sign a payload using JWS. After signing, I need to encrypt it using JWE. I was able to accomplish the signing part by referring to an example I found on Stack Overflow, which I believe someone here may have answered.
However, I’m facing a challenge when it comes to using the built-in crypto module to encrypt the JWS payload in a JWE-compliant manner, using encryption algorithms like A256CBC-HS512 or RSA-OAEP-256. I haven’t been able to find a way or an example demonstrating this.
Does anyone here have experience with accomplishing this task? It goes without saying that I’m trying not to include any external library to achieve this.