Created
June 7, 2022 13:29
-
-
Save srujan21/f73099c3666f1d2c7babdb82800d473c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
recordid=ApexPages.currentPage().getParameters().get('CA_Info'); | |
if(recordid!=null && recordid!='') | |
{ | |
if(recordid.contains(' ')) | |
recordid=recordid.replace(' ','+'); | |
Blob cryptoKey = Blob.valueOf('lmf456ert0123acf'); | |
Blob exampleIv = Blob.valueOf('0ydioopwur12IV12'); | |
Blob data = Encodingutil.base64Decode(String.valueOf(recordid)); | |
Blob decryptedData = Crypto.decrypt('AES128', cryptoKey , exampleIv, data); | |
recordid= decryptedData.toString(); | |
System.debug('recordid ***' + recordid); | |
lstuserId = [SELECT Email,ProfileId,Username FROM User where id = :System.Label.Mirror_Credit_Guest_User limit 1]; | |
System.debug('Found user: '+lstuserId); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment