Module Http.Base64
Base64 codec.
Codecs Base64 according to RFC 4684.
val encode : ?url:bool -> string -> string
encode s
is thebase64
(orbase64url
ifurl
istrue
) encoding ofs
.
val decode : ?url:bool -> string -> (string, int) Stdlib.result
decode s
is thebase64
(orbase64url
ifurl
istrue
) decode ofs
. In case of error the integer indicates:- Either the byte index of the error for an invalid alphabet character error
- Or the length of the string if the string length is not a multiple of
4