‘simpleserial-aes.c’ code receive a letter through the getch() function and use ‘x’,‘k’,‘p’ as a separator to communicate.
When it contains ‘x’,‘k’ and ‘p’ to the actual plaintext and key, I can’t find the code that determines whether ‘x’,‘k’,‘p’ use as data or a separator.
I would like to know if I can distinguish.
‘simple serial-aes.c’ has a code that turns the state into ‘IDLE’ by using the separator ‘x’ in the first if statement.
Also, the code changes ‘KEY’ or ‘PLAIN’ state to ‘IDLE’ state when I get ‘x’.
Nevertheless, why should I convert to ‘IDLE’ status when it comes to character named ‘x’ in the first if statement?
If the question is somewhat difficult to understand, please understand that I am by the lack of English.
Ah - the plaintext/key are assumed to be in hex. So for example it’s looking for a string that has “k000102030405060708090A0B0C0D0E0F” (followed by a newline). If you wanted to represent that as a UNICODE/ASCII string it would come up as something else. Because it’s limited to the ASCII characters, the key/plaintext won’t have those special characters in it!