Encoding rewrites the same bytes in a different alphabet, so it hides nothing. This set covers base64 and hex, the decode that quietly succeeds on input that was never base64, and the round trip check the finished encdec.sh adds to catch it.
Each one is marked as you go, and the explanation arrives straight after, which is
the part worth reading.
4 questions, marked as you go.
Tasks
These need your own device. Run the command in Termux, then paste what it printed.
The marking looks at what the output means, so spacing, version numbers and
ordering do not matter. If you have not installed anything yet, the
lesson covers the setup.
Encode a value and decode it back
The encdec.sh you finished is saved next to you. This encodes café to hex, which shows the UTF-8 bytes rather than the latin-1 ones, then decodes a base64 string back to text. Paste both lines.
Run this in Termux
On your own device. Nothing on this page executes it. The command runs in
your terminal, and this box only reads what you paste back.
The first line is six pairs of hex digits, because é takes two bytes in UTF-8.
the hex is the UTF-8 bytes, not latin-1
the base64 decoded back to text
the script ran
What a good answer looks like
Two lines. The first is 63 61 66 c3 a9, which is c, a, f, then the two bytes of é. The second is hello termux. The point of the first line is that é is c3 a9 in UTF-8 and e9 in latin-1, so a tool showing e9 is treating your text as latin-1 and would mangle it on the way back. If you see e9, the encoding path is wrong.
Marking your own work
Both halves of this are checked in your browser, with no server involved, so nothing
stops you from pasting output you did not run. The tasks are written so that the
easiest way to pass one is to actually do it and read the result, which is the whole
intention.