I need to send a struct, that includes several integers and string (so far) over the network, but I'm not really happy how it works
I have a function that puts everything in a string, which I send over to the server and a function that decodes that string and puts everything in place, but as you might see from the code, the string that i'm sending thru the network is just a simple string that can be read by anyone, so is there a way to somehow encode the struct to a "unreadable" form (maybe not a string) but still decodable?
((x ^ k) ^ k) == x, so a quick way to obfuscate a bitstring is to bitwise-XOR it by some arbitrary constant. It's not encryption, obviously, but it makes it so a human can't simply look at the stream to know what's being transmitted.