Hi guys,
loves this mailing list. I am working with some aes encryption but the
following implementation produces an error -
The type or namespace name 'AesCryptoServiceProvider' could not be found
(are you missing a using directive or an assembly reference?)
public static string EncryptString(string plainSourceStringToEncrypt,
string passPhrase)
{
//Set up the encryption objects
using (AesCryptoServiceProvider acsp =
GetProvider(Encoding.Default.GetBytes(passPhrase)))
{
byte[] sourceBytes =
Encoding.ASCII.GetBytes(plainSourceStringToEncrypt);
ICryptoTransform ictE = acsp.CreateEncryptor();
//Set up stream to contain the encryption
MemoryStream msS = new MemoryStream();
//Perform the encrpytion, storing output into the stream
CryptoStream csS = new CryptoStream(msS, ictE,
CryptoStreamMode.Write);
csS.Write(sourceBytes, 0, sourceBytes.Length);
csS.FlushFinalBlock();
//sourceBytes are now encrypted as an array of secure bytes
byte[] encryptedBytes = msS.ToArray(); //.ToArray() is
important, don't mess with the buffer
//return the encrypted bytes as a BASE64 encoded string
return Convert.ToBase64String(encryptedBytes);
}
}
Is the AesCryptoServiceProvider not implemented in mono or is it just some
stupid mistake - regards
--
View this message in context:
http://mono-for-android.1047100.n5.nabble.com/Is-AesCryptoServiceProvider-not-implemented-tp5710843.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid