base64
(stdlib)Implements base 64 encode and decode, see RFC2045.
Implements base 64 encode and decode, see RFC2045.
Functions
encode(Data) -> Base64
Data = string() | binary()Base64 = binary()
encode_to_string(Data) -> Base64String
Data = string() | binary()Base64String = ascii_string()
Encodes a plain ASCII string into base64. The result will be 33% larger than the data.
decode(Base64) -> Data
Base64 = string() | binary()Data = binary()
decode_to_string(Base64) -> DataString
Base64 = string() | binary()DataString = string()
mime_decode(Base64) -> Data
Base64 = string() | binary()Data = binary()
mime_decode_to_string(Base64) -> DataString
Base64 = string() | binary()DataString = string()
Decodes a base64 encoded string to plain ASCII. See RFC4648.
mime_decode/1 and mime_decode_to_string/1
strips away illegal characters, while decode/1 and
decode_to_string/1 only strips away whitespace characters.