好的,首先,我让它写入到文件中..
string line1, line2, line3, line4, line5, line6, line7, line8, line9, line10;
// step 1, calculate MD5 hash from input
MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(Password);
byte[] hash = md5.ComputeHash(inputBytes);
// step 2, convert byte array to hex string
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hash.Length; i++)
{
sb.Append(hash[i].ToString("X2"));
}
using (StreamWriter sw = File.CreateText(path))
{
sw.WriteLine(Username);
sw.WriteLine(sb.ToString());
}然后。我怎样才能使它可以从文件中读取?作为普通文本。不是加密的表单
发布于 2012-03-05 17:29:37
这里有一个有用的指南:NET-Encryption-Simplified
https://stackoverflow.com/questions/9563783
复制相似问题