Sign in to follow this  
Followers 0
spcz

How to transfer C# AES-256 to autoit

2 posts in this topic

#1 ·  Posted (edited)

The C# code is as below, how to change it to au3? Thanks!

public static string Encrypt(string toEncrypt) 
{
   // 256-AES key    
    byte[] keyArray = UTF8Encoding.UTF8.GetBytes("12345678901234567890123456789012");
    byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);

    RijndaelManaged rDel = new RijndaelManaged();
    rDel.Key = keyArray;
    rDel.Mode = CipherMode.ECB;
    rDel.Padding = PaddingMode.PKCS7;

    ICryptoTransform cTransform = rDel.CreateEncryptor();
    byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);

    return Convert.ToBase64String(resultArray, 0, resultArray.Length);
}
Edited by spcz

Share this post


Link to post
Share on other sites



Search on the forum. 

Saludos

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0