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 12
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
    83,822 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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 1,452

#2
YUN ZHU Profile Picture

YUN ZHU 1,313 Super User 2025 Season 1

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 1,083 Most Valuable Professional

Featured topics

Product updates

Dynamics 365 release plans