Your UX is waiting ...interact, engage, explore in Las Vegas at CloudWorld 2023

Learn more
Encrytion and Decryption of String in OIC — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Encrytion and Decryption of String in OIC

Received Response
36
Views
2
Comments
edited Jun 7, 2022 1:21PM in General Technical Discussions 2 comments

Summary

Encrytion and Decryption of String in OIC

Content

Hi Experts,

Has anyone tried encrypting and decryption of a string in OIC through custom JS. Below is the code I have been trying but receiving an error : The XPath expression failed to execute; the reason was: oracle.fabric.common.xml.xpath.XPathFunctionException: ReferenceError: "CryptoJS" is not defined. (js/Function/CryptFucntion.js#3)

function Encrypt(secret,ipstring)
{
 var cipher = CryptoJS.AES.encrypt(ipstring,secret);
 var result = cipher.toString();
return result;
}

function Decrypt(secret,ipstring)
{
   var decipher = CryptoJS.AES.decrypt(ipstring,secret);
   var result = decipher.toString(CryptoJS.enc.Utf8);
   return result;
}

 

Version

20.2.2.0.0 (200517.0200.35623)

Code Snippet

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!