It is possible that bytes change in some quality, but this usually only happens with numbers (see https://beej.us/guide/bgnet/html/multi/htonsman.html ). Most likely, this is a bit with each char. You just need a simple algorithm to switch them before decryption. Of course, if the AND bits are mixed up, this is even more fun.
Now the fact that it displays the same line leads me to think that the problem is not in the character array itself - it is something in the decryption algorithm itself, depending on the byte order. In this case, you should definitely take a look at the link above and think about what operations you perform for multibyte types. (64-bit limit switches usually need to be written manually, but byte replacement is not a complicated algorithm for writing.)
source share