公共字符串加密(string plainText){String} {StringBuilder sb = new StringBuilder();我有一個加密的txt文件和下面的加密代碼。如何解密它?
foreach (char c in plainText) {
if (Char.IsLetterOrDigit(c)) {
int num = (int)c;
num = ((num + 10) * 2) + 2;
sb.AppendFormat("{0} ", num.ToString());
}
else if (c == ' ') {
sb.Append("| ");
}
else if (c == '\n') {
sb.AppendLine();
}
}
return sb.ToString();
}
http://mattgemmell.com/2008/12/08/what-have-you-tried/ – alberge 2012-04-05 11:17:18