Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

I want to encrypt a field value in AEM Forms, How can we encrypt a field in AEM forms

Avatar

Level 1
 
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@dasarinikhil 

In the rule editor -> value commit event you can use below.

This key can be used to encrypt and decrypt.

var key = "encrypkey";

 

encrypting:

 

var encrypted = CryptoJS.AES.encrypt(value, key);
// console.log("encrypted ==>"+encrypted);

 

decrypting:

var decrypted = CryptoJS.AES.decrypt(encrypted , key);
var decryptedValue = decrypted.toString(CryptoJS.enc.Utf8)

 

hope this helps

Thanks,

Siva

Thanks,
Siva

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

@dasarinikhil 

In the rule editor -> value commit event you can use below.

This key can be used to encrypt and decrypt.

var key = "encrypkey";

 

encrypting:

 

var encrypted = CryptoJS.AES.encrypt(value, key);
// console.log("encrypted ==>"+encrypted);

 

decrypting:

var decrypted = CryptoJS.AES.decrypt(encrypted , key);
var decryptedValue = decrypted.toString(CryptoJS.enc.Utf8)

 

hope this helps

Thanks,

Siva

Thanks,
Siva