本帖最后由 josong 于 2015-5-31 10:36 编辑
不是很清晰
[C#] 纯文本查看 复制代码 button_click(object, EventArgs)
{
while ( XYZ(textBox.Text) )
{
MessageBox.Show( Decode("??帖搡????僭?鴄??") );
return;
}
MessageBox.Show( (Decode("吻猵嬤奴?") );
}
[C#] 纯文本查看 复制代码 bool XYZ(String str)
{
return (str == Encoding.UTF8.GetString(new byte[] {
0xe4, 0xbc, 0xb0, 0xe8, 0xae, 0xa1, 0xe5, 0x8f, 0x88, 230, 0x98, 0xaf, 0xe7, 0x94, 0xbb, 0xe7,
0x9c, 0x89, 0x2e, 0x2e, 0x2e }));
}
[C#] 纯文本查看 复制代码 private string Decode(string str)
{
int iLen = str.Length;
char[] cAry = new char[iLen];
for (int i = 0; i < cAry.Length; i++)
{
char c = str[i];
byte V_4 = (byte) (c ^ (iLen - i));
byte V_5 = (byte) ((c >> 8) ^ i);
cAry[i] = (char) ((V_5 << 8) | V_4);
}
return string.Intern(new string(cAry));
}
|