works kinda

This commit is contained in:
fabjuuuh
2020-10-19 16:13:51 +02:00
parent 2adfcc5bd7
commit aa5ea7a3e0
3 changed files with 30 additions and 7 deletions

View File

@@ -4,9 +4,11 @@ using System;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Printing.IndexedProperties;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Media.Animation;
namespace Util
{
@@ -289,8 +291,12 @@ namespace Util
private static byte[] GetRawDataDoctor(byte[] payload, string username, byte messageID)
{
return getMessage(payload.Concat(Encoding.ASCII.GetBytes(username)).ToArray(), messageID);
Debug.WriteLine(BitConverter.ToString(Encoding.ASCII.GetBytes(username)));
byte[] nameArray = Encoding.ASCII.GetBytes(username);
byte[] total = new byte[nameArray.Length + payload.Length];
Array.Copy(payload, 0, total, 0, payload.Length);
Array.Copy(nameArray,0,total,payload.Length,nameArray.Length);
return getMessage(total,messageID);
}
/// <summary>