Jump to content
Sign in to follow this  
spcz

How to transfer C# AES-256 to autoit

Recommended Posts

spcz

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
Danyfirex

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.