Problem using AesManaged from System.Security.Cryptography

Hello, I’ve a (maybe stupid) question.

I am trying to use the .Net class AesManaged (Namespace: System.Security.Cryptography, Assembly: System.Core).
See .Net reference here.

Here the relevant parts of my script:

 ...
 using System.Security.Cryptography;
 ...

 private string ComputeAuthenticityToken()
 {
     ...
     AesManaged aesmanaged = new AesManaged();
     ...
 }

However, the “AesManaged” line causes the error message “The type or namespace name `AesManaged’ could not be found. Are you missing a using directive or an assembly reference?”

What am I doing wrong ?

P.S.: If I replace both AesManaged by System.Security.Cryptography.AesManaged, the error message reads “The type or namespace name AesManaged' does not exist in the namespace System.Security.Cryptography’. Are you missing an assembly reference?”

P.P.S: Adding System.Core.dll to my assets folder didn’t help.

Version 2.x of Unity works against essentially the C#.NET 2.0 version. AesManaged wasn’t added until version 3.5. It’s my understanding that Unity 3.0 will update the version of C# (not sure to what, hopefully 4.0!) so it may work once that’s released. But it’ll still be dependent on whether or not Mono (the open-source implementation of .NET that Unity uses) implemented the class.

EDIT: The Mono version supporting C# 4.0 is still TBD for release, so I’m guessing we’ll get C# 3.0 or 3.5.

Thank you.