Example for Encrypt Data
Hello everyone, I want to implement a solution to encrypt a JWT in JWE, but I find it difficult to find a working example, could the support provide a happy way for this in the documentation?
The requirements for encrypt are: {"alg": "RSA-OAEP", "enc": "A128GCM", "cty": "JWT"}
I also have a PEM public key, if anyone can help in any way, I would be immensely grateful!
Cheers, @bryannbarbosa
You could get started with my node-jose-tools package. It offers a CLI interface for node-jose. Its docu has some examples and you can toy with different features and strategies on the command line.
Each tool is structurally isolated, so you can have a closer look at how to implement the different features with node-jose. It has also a worked example for importing different key formats, including PEM.