Fix revert errato

revert Revert to 19a5a08f04

revert First experimental encryption implementation (not working)
This commit is contained in:
2025-12-03 09:20:35 +00:00
parent c071c706ee
commit 7994f3d066
7 changed files with 511 additions and 1314 deletions

View File

@@ -42,6 +42,19 @@ namespace SamaPager_Client
UdpStack.Send(msgData, msgData.Length, serverEndPoint);
}
internal void SendEncryptedMessage(string message, string key)
{
char[] encryptedMessage = new char[0];
for (int i = 0; i < message.Length; i++)
{
char cock = (char)(message[i] ^ key[i % key.Length]);
encryptedMessage.Append(cock);
}
MessageBox.Show(Convert.ToBase64String(Encoding.UTF8.GetBytes(encryptedMessage)));
}
internal string SendCommand(string command)
{
byte[] msgData = Encoding.UTF8.GetBytes(command);