/// <summary> /// XML反序列化为对象 /// </summary> /// <param name="array"></param> /// <param name="type"></param> /// <returns></returns> public static object Deserialize(byte[] array, Type type) { return(XMLSerializer.DecompressDecryptToObject(array, type)); }
/// <summary> /// XML序列化成字节 /// </summary> /// <param name="obj"></param> /// <returns></returns> public static byte[] Serialize(object obj) { return(XMLSerializer.CompressEncryptToBytes(obj)); }