谢谢
原来的还原代码是这样的,但是只能还原12位的,我这个字符串是8位的,不知道怎么还原(现在还原8位会出错),请教hellson及各位高手,谢谢。
byte[] buffer3;
byte[] bytes = Encoding.ASCII.GetBytes("PDE_DXRS");
byte[] rgbIV = Encoding.ASCII.GetBytes("PDE_DXRS");
try
{
buffer3 = Convert.FromBase64String(data);
}
catch
{
return null;
}
DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
MemoryStream stream = new MemoryStream(buffer3);
CryptoStream stream2 = new CryptoStream(stream, provider.CreateDecryptor(bytes, rgbIV), CryptoStreamMode.Read);
StreamReader reader = new StreamReader(stream2);
return reader.ReadToEnd();