Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

AES encryption not working

(1) ShareShare
ReportReport
Posted on by
Dear Team,
 
I want to Encrypt the string using AES encryption .i have written below code but getting error. Can anyone suggest .
 
//To perform AES Encryption++
aes:=aes;
aes.Key:=Encoding.UTF8.GetBytes('ABCDJNDKJKDFNKNSNKS');
//aes.GenerateIV;
Encryptor:=aes.CreateEncryptor();
msEncrypt:=msEncrypt.MemoryStream;
csEncrypt:=csEncrypt.CryptoStream(msEncrypt,Encryptor,CryptoStreamMode.Read);
swEncrypt:=swEncrypt.StreamWriter(csEncrypt);
swEncrypt.Write(JsonString);
Encoded:=Convert.ToBase64String(msEncrypt.ToArray);
MESSAGE('%1',Encoded);
//--
 
 
 
 
  • Suggested answer
    YUN ZHU Profile Picture
    Super User 2025 Season 1 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans