can't figure out why it keeps adding random "?" at the end of cypher.
Also made the cyphertext length to be x+1 which apparantly could be the problem, but didn't solve it in my case.
-
please post actual code and error text here and not screenshots– UpAndAdamCommented Dec 5, 2023 at 15:13
-
No screenshots please. put the code in the text.– guyewhite ♦Commented Dec 15, 2023 at 1:27
Add a comment
|
1 Answer
Did you remember to copy the end of string marker, '\0' into the last position? Without it, the program will keep reading and printing whatever data follows until it finds a random 0x00 that it thinks is the EOS marker.
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)