This is the code:
string key = "d771815a7f74ebfaa2d44f8b7654fa19e7a02452c2ab351d222e49297910a814";
AesCryptoServiceProvider aes = new AesCryptoServiceProvider();
aes.Padding = PaddingMode.None;
aes.Mode = CipherMode.ECB;
aes.BlockSize = 128;
aes.KeySize = 256;
aes.Key = ASCIIEncoding.ASCII.GetBytes(key);
It throws:
System.Security.Cryptography.CryptographicException: 'The specified key is not a valid size for this algorithm.'
Did I do something wrong?