我想AES/CBC/Nopadding在c#Windows Phone 8应用程序中解密加密Sting .我的字符串在IsolatedSorage.我粘贴了垃圾桶HERE.
从这篇文章我使用AesManaged类来解密.但是如何设置填充,NoPadding因为默认情况下填充设置为PKCS7从这里开始.
string fileName = "titlepage.xhtml";
if (fileStorage.FileExists(fileName))
{
IsolatedStorageFileStream someStream = fileStorage.OpenFile(fileName, System.IO.FileMode.Open, FileAccess.Read);
using (StreamReader reader = new StreamReader(someStream))
{
str1 = reader.ReadToEnd();
MessageBox.Show(str1);
try
{
string text = Decrypt(str1, "****************", "****************");
MessageBox.Show(text);
}
catch (CryptographicException cryptEx)
{
MessageBox.Show(cryptEx.Message, "Encryption Error", MessageBoxButton.OK);
}
catch (Exception ex)
{