Encryption functions for AES GCM | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Milan_Vucetic

Hi @salvatore_dange,

Unfortunately not.
Only CBC chipper mode is supported and function is cryptString (AES algorithm).

Regards,

Milan

 

3 replies

Milan_Vucetic
Milan_VuceticAccepted solution
Level 9
June 25, 2020

Hi @salvatore_dange,

Unfortunately not.
Only CBC chipper mode is supported and function is cryptString (AES algorithm).

Regards,

Milan

 

Darren_Bowers
Level 9
June 25, 2020

Hi @salvatore_dange - as @milan_vucetic said, there is no built-in AES-GCM crypto library in Campaign, but you can easily create your own.

https://github.com/rndme/aes4js - if you bring in this JS file intro your JavaScript codes folder and then include it into whatever process you want to encrypt/decrypt with then you have AEM GCS library support.

Cheers Darren

Level 2
June 26, 2020

Hello,

Thanks for these feedbacks.

@darren_bowers this javascript probably needs some libraries and browser-related APIs to work. In fact, as you can see it fails with a simple test:


In case you find a code with no dependency, can you tell me also how to use it in a personalization block (loadLibrary probably doesn't work)?

 

@milan_vucetic what about RSA encryption methods?

 

Thanks again!
Salvatore

 

Darren_Bowers
Level 9
June 28, 2020
@salvatore_dange You might need to hunt around for example code that will run on Campaign. Its a bit hit and miss trying to find specific crypto libraries that are built from the ground up in JS. You might find you have to piece something together if you want native JS that runs on Campaign. Otherwise if you *must* have this particular cypher then you might have to create a local webservice that you can call to encrypt / decrypt when you need it.