private void SaveData(System.IO.Stream dataStream, object data) { using (FortEncryptionStream fortEncryptionStream = new FortEncryptionStream(dataStream)) { Serializer.Serializer serializer = new Serializer.Serializer(); serializer.Serialize(fortEncryptionStream, data); } }
private object LoadData(System.IO.Stream dataStream) { using (FortEncryptionStream fortEncryptionStream = new FortEncryptionStream(dataStream)) { Serializer.Serializer serializer = new Serializer.Serializer(); return(serializer.Deserialize(fortEncryptionStream)); } }