escentmachine / field notes
Encoding
Unicode, UTF-8, Base64 and the distinction between text and bytes.
-
If it is Base64, anyone can read it without a key
Base64 transports bytes as text. It does not make them secret. Separate the alphabet, the byte sequence and the text decoding step.
-
One visible character can cross several byte boundaries
UTF-8 bytes, JavaScript code units and visible characters answer different questions. Keep Unicode intact when inspecting encoded data.