编译DLL后得到加密字符串 Operators.CompareString这是一个方法名百度有介绍 if (Operators.CompareString(this.MD5(Strings.LCase(this.MD5(this.MD5(sHost + this.Procedures(), 16) + this.MD5(Strings.StrReverse(sHost + this.Procedures()), 32), 16)), 32), this.MD5(Strings.LCase(Strings.StrReverse(Strings.Replace(sSN, "-", "", 1, -1, CompareMethod.Binary))), 32), false) != 0) { flag = false; num = 5; continue; } 从这里可以看出来就是一个判断结果,如果两个KEY不一样就返回false if (!this.FormatSN(strArray1[index], strArray2[index])) { flag1 = false; if (1 == 0) ; num1 = 5; continue; } public string Procedures() 这里是类里的一个公共函数返回值xywap_zf { return "xywap_zf"; } 以下是本人亲测过的试验代码 测试时手动定义变量 shost = "192.168.1.2" sSN = "181F-3831-E72D-8336" 大小写两种方法都可以 下面stra就是解密的字符串 stra = Strings.LCase(Strings.StrReverse(xywap.MD5(xywap.MD5(shost + xywap.Procedures(), 16) + xywap.MD5(Strings.StrReverse(shost + xywap.Procedures()), 32), 16))) 'stra = Strings.UCase(Strings.StrReverse(xywap.MD5(xywap.MD5(shost + xywap.Procedures(), 16) + xywap.MD5(Strings.StrReverse(shost + xywap.Procedures()), 32), 16))) Response.Write(stra.Substring(0, 4) + "-" + stra.Substring(4, 4) + "-" + stra.Substring(8, 4) + "-" + stra.Substring(12, 4)) Response.Write(stra) Response.Write("<Br/>") 需要比较的加密串 Response.Write(xywap.MD5(Strings.LCase(Strings.StrReverse(Strings.Replace(sSN, "-", "", 1, -1, CompareMethod.Binary))), 32))