异或加密的问题,在线等。。。。。。。
是这样异或的
byte[] bKey = Common.tobyte("as3ad6f77saa");
byte[] bOutput = new byte[bInput.Length];
for (int i = 0; i < bInput.Length; i++)
{
if (i >= bKey.Length)
{
bOutput[i] = (byte)(bInput[i] ^ bKey[i - bKey.Length]);
}
else
{
bOutput[i] = (byte)(bInput[i] ^ bKey[i]);
}
}
return bOutput;
英文字符、数字都没有问题。
当加密中文,进行解密的时候,解密出来的内容就变成乱码了
不知道是什么原因呢