Base64.Decode
Decode Base64 strings.
Decoders
string :
String -> Result Error String
Decode a Base64 string as String.
bytes :
String -> Result Error Bytes
Decode a Base64 string as Bytes.
type Error
= InvalidCharacter Char
| IncorrectPadding
| InvalidLength
| BytesToStringError
The errors that can happen when decoding a Base64 string.
InvalidCharacterhappens when encountering an invalid character in the passed Base64 string.IncorrectPaddinghappens when the Base64 string has padding (the=character) anywhere other than the the last two characters.InvalidLengthhappens when the Base64 string is an invalid lengthBytesToStringErrorhappens only when using thestringfunction in this module and there is a problem converting the decodedBytesinto aString.