The different bases that can be used.
See
RFC4648 for details. In particular, Base64 can be standard
or
URL-safe. URL-safe encoding is often used in other
specifications without
padding characters.
RFC 2045 defines a separate Base64 encoding, which is not
supported. This format requires a newline at least every 76 encoded
characters, which works around limitations of older email programs
that could not handle long lines. Be aware that other languages, such
as Ruby, encode the RFC 2045 version by default. To decode their
output, remove all newlines before decoding.
Examples
A quick example to show the differences:
>>> let input = "Is 3 > 2?" :: ByteString
>>> let convertedTo base = convertToBase base input :: ByteString
>>> convertedTo Base16
"49732033203e20323f"
>>> convertedTo Base32
"JFZSAMZAHYQDEPY="
>>> convertedTo Base64
"SXMgMyA+IDI/"
>>> convertedTo Base64URLUnpadded
"SXMgMyA-IDI_"
>>> convertedTo Base64OpenBSD
"QVKeKw.8GBG9"