Represent a base 64 mapping. The 64 characters used in the encoding can be
specified, since modified-UTF-7 uses other characters than UTF-7 (',' instead
of '/').
The exact type of the arguments and result values is adapted to the needs of
the encoder and decoder, as opposed to following a strict interpretation of
base 64.
Base 64, as specified in RFC 2045, is an encoding used to encode bytes as
characters. In (modified-)UTF-7 however, it is used to encode characters as
bytes, using some intermediate steps:
- Encode all characters as a 16-bit (UTF-16) integer value
- Write this as stream of bytes (most-significant first)
- Encode these bytes using (modified) base 64 encoding
- Write the thus formed stream of characters as a stream of bytes, using
ASCII encoding
|