33,008
社区成员
发帖
与我相关
我的任务
分享
string str = "BF6W3A776";
byte C, c, D, d, B;
byte[] bytes = new ASCIIEncoding().GetBytes("m@nq&3$r3T@i1rM#");
int num4 = ("0123456789ABCDEFGHJKLMNPQRTUVWXY".IndexOf(str[0]) ^ bytes[4 % bytes.Length]) & 15;
for (int i = 0; i < 4; i++)
{
if ((num4 & (1 << (i & 0x1f))) != 0)
{
int index = "0123456789ABCDEFGHJKLMNPQRTUVWXY".IndexOf(str[(i * 2) + 1]);
int num3 = (("0123456789ABCDEFGHJKLMNPQRTUVWXY".IndexOf(str[(i * 2) + 2]) << 4) + index) ^ bytes[i % bytes.Length];
if (i == 3)
{
C = (byte)((num3 & 240) >> 4); //1
d = (byte)(num3 & 15); //6
}
else if (i == 2)
{
D = (byte)num3; //20
}
else if (i == 1)
{
c = (byte)num3;
}
else if (i == 0)
{
B = (byte)num3;
}
}
}