truqu/elm-base64/1.0.2

NOTE: this package is not compatible with Elm 0.19.1

Base64

Library for base64 encoding and decoding of Ascii strings. For the moment only works with the characters :

" !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"

Method

encode : String -> Result String String

base64 encodes an ascii string. If the input is not valid returns a Result.Err, otherwise a Result.Ok String encode("Elm is Cool") == Result.Ok "RWxtIGlzIENvb2w="

decode : String -> Result String String

base64 decodes an ascii string. If the input is not a valid base64 string returns a Result.Err, otherwise a Result.Ok String decode("RWxtIGlzIENvb2w=") == Result.Ok "Elm is Cool"