public void DecryptTest() { byte[] encrypted = null; byte[] expected = null; byte[] actual; actual = JhEncrypt.Decrypt(encrypted); Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
public void DecryptTest4() { string original = string.Empty; string expected = string.Empty; string actual; actual = JhEncrypt.Decrypt(original); Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
public void DecryptTest1() { string encrypted = string.Empty; string key = string.Empty; Encoding encoding = null; string expected = string.Empty; string actual; actual = JhEncrypt.Decrypt(encrypted, key, encoding); Assert.AreEqual(expected, actual); Assert.Inconclusive("验证此测试方法的正确性。"); }
public static T DePacketData(byte[] content, string strKey) { JsonSerializerSettings setting = new JsonSerializerSettings(); setting.NullValueHandling = NullValueHandling.Ignore; //忽略为NULL的值 T t; string strJson = SerializeHelper.DeserializeWithBinary(content).ToString(); //反序列化 strJson = JhEncrypt.Decrypt(strJson, strKey); //解密 t = (T)JsonConvert.DeserializeObject(strJson, typeof(T), setting); //json转对象 return(t); }