public static Template.DataPackage DecryprtDataPackage(Template.DataPackage dataPackage) { Template.DataPackage decryptedDataPackage = new Template.DataPackage() { Data = Crypto.Decrypt.String(dataPackage.Data, Resources.ServerResources.ConnectionKey), Params = Crypto.Decrypt.String(dataPackage.Params, Resources.ServerResources.ConnectionKey), Name = GetPackageName(), Packet = dataPackage.Packet }; return(decryptedDataPackage); }
public static void EvaluateDataPackage(Template.DataPackage dataPackage) { if (dataPackage.Packet == Template.PacketKind.DataExchange) { Evaluate.DataExchange.GetInformation(dataPackage); Events.DataPackageEvents.DataExchangeReceived.OnAppear(new Events.Args.EventArgs.DataPackageEventArgs() { dataPackage = dataPackage }); } else if (dataPackage.Packet == Template.PacketKind.DownloadRequest) { Evaluate.DownloadRequest.GetInformation(dataPackage); } else if (dataPackage.Packet == Template.PacketKind.UploadRequest) { } else if (dataPackage.Packet == Template.PacketKind.Message) { } else if (dataPackage.Packet == Template.PacketKind.BugReport) { } }