This package can convert bytes to Base64 strings and vice versa.
Convert a Base64 string to bytes.
If you want more control over the process, you should use encoder.
This function fails (returns Nothing) if you give it an invalid Base64 sequence.
encoder returns a bytes encoder. It fails if the string that is passed
to it is not a valid Base64 sequence.
It's used in toBytes:
toBytes : String -> Maybe Bytes
toBytes string =
Maybe.map Bytes.Encode.encode (encoder string)
Convert bytes to a Base64 string. If you want more control over the process, you should use
decoder.This function should never return
Nothing, but it usesBytes.Decode.decode, which returns aMaybe String.