private static string Encrypt04String(string CallPassword, string s) { if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安") { return(""); } if (s == "") { return(""); } byte[] bytes = Encoding.UTF8.GetBytes(s); int length = bytes.Length; int num2 = (DateTime.Now.Millisecond + 200) / 2; int[] numArray = new int[] { num2 / 100, (num2 % 100) / 10, num2 % 10 }; string str = num2.ToString().PadLeft(3, '0'); for (int i = 0; i < length; i++) { int num4 = bytes[i]; num4 += numArray[i % 3]; str = str + num4.ToString().PadLeft(3, '0'); } KeysTwo c = new KeysTwo(); for (int j = 0; j < 0x34; j++) { str = str.Replace(c.strings[0, j], c.strings[1, j]); } return("04" + str); }
private static string DeEncrypt04String(string CallPassword, string s) { int num; if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安") { return(""); } if (((s == null) || (s == "")) || ((s.Length < 2) || !s.StartsWith("04"))) { return(""); } s = s.Substring(2, s.Length - 2); KeysTwo c = new KeysTwo(); for (num = 0x33; num >= 0; num--) { s = s.Replace(c.strings[1, num], c.strings[0, num]); } int num3 = int.Parse(s.Substring(0, 3)); int[] numArray = new int[] { num3 / 100, (num3 % 100) / 10, num3 % 10 }; s = s.Substring(3, s.Length - 3); int num2 = s.Length / 3; byte[] bytes = new byte[num2]; for (num = 0; num < num2; num++) { bytes[num] = (byte)(int.Parse(s.Substring(num * 3, 3)) - numArray[num % 3]); } return(Encoding.UTF8.GetString(bytes)); }
private static string Encrypt04String(string CallPassword, string s) { if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安") { return ""; } if (s == "") { return ""; } byte[] bytes = Encoding.UTF8.GetBytes(s); int length = bytes.Length; int num2 = (DateTime.Now.Millisecond + 200) / 2; int[] numArray = new int[] { num2 / 100, (num2 % 100) / 10, num2 % 10 }; string str = num2.ToString().PadLeft(3, '0'); for (int i = 0; i < length; i++) { int num4 = bytes[i]; num4 += numArray[i % 3]; str = str + num4.ToString().PadLeft(3, '0'); } KeysTwo c = new KeysTwo(); for (int j = 0; j < 0x34; j++) { str = str.Replace(c.strings[0, j], c.strings[1, j]); } return ("04" + str); }
private static string DeEncrypt04String(string CallPassword, string s) { int num; if (CallPassword != "ShoveSoft CO.,Ltd -- by Shove 20050709 深圳宝安") { return ""; } if (((s == null) || (s == "")) || ((s.Length < 2) || !s.StartsWith("04"))) { return ""; } s = s.Substring(2, s.Length - 2); KeysTwo c = new KeysTwo(); for (num = 0x33; num >= 0; num--) { s = s.Replace(c.strings[1, num], c.strings[0, num]); } int num3 = int.Parse(s.Substring(0, 3)); int[] numArray = new int[] { num3 / 100, (num3 % 100) / 10, num3 % 10 }; s = s.Substring(3, s.Length - 3); int num2 = s.Length / 3; byte[] bytes = new byte[num2]; for (num = 0; num < num2; num++) { bytes[num] = (byte) (int.Parse(s.Substring(num * 3, 3)) - numArray[num % 3]); } return Encoding.UTF8.GetString(bytes); }