Module Brr.Base64

Base64 codec.

As performed by btoa and atob functions.

val encode : Jstr.t -> (Jstr.tJv.Error.t) Stdlib.result

encode s encodes the binary string s to Base64. Errors if s is not a binary string.

val decode : Jstr.t -> (Jstr.tJv.Error.t) Stdlib.result

decode s decodes the Base64 encoded string s to a binary string. Errors if s is not only made of US-ASCII characters or is not well formed Base64.