package base64

  1. Overview
  2. Docs
Base64 encoding and decoding library

Install

Dune Dependency

Authors

Maintainers

Sources

v2.0.0.tar.gz
sha256=029b6a7af1493a077dc25c8e0f3534e5f5ff6e4260e3998a9ca3850fb7238c2c
md5=52b9736839c83cf88a9fb1373cf2e35c

doc/base64/B64/index.html

Module B64

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. It is specified in RFC 4648.

val default_alphabet : string

A 64-character string specifying the regular Base64 alphabet.

val uri_safe_alphabet : string

A 64-character string specifying the URI- and filename-safe Base64 alphabet.

val decode : ?alphabet:string -> string -> string

decode s decodes the string s that is encoded in base64 format. Will leave trailing NULLs on the string, padding it out to a multiple of 3 characters.

val encode : ?pad:bool -> ?alphabet:string -> string -> string

encode s encodes the string s into base64. If pad is false, no trailing padding is added.

OCaml

Innovation. Community. Security.