mte/unikernel/duniverse/ocaml-base64
2025-11-11 02:07:51 +01:00
..
bench 2025-11-11 02:07:51 +01:00
config 2025-11-11 02:07:51 +01:00
fuzz 2025-11-11 02:07:51 +01:00
src 2025-11-11 02:07:51 +01:00
test 2025-11-11 02:07:51 +01:00
.gitignore 2025-11-11 02:07:51 +01:00
.ocamlformat 2025-11-11 02:07:51 +01:00
.ocp-indent 2025-11-11 02:07:51 +01:00
.travis-ci.sh 2025-11-11 02:07:51 +01:00
base64.opam 2025-11-11 02:07:51 +01:00
CHANGES.md 2025-11-11 02:07:51 +01:00
dune-project 2025-11-11 02:07:51 +01:00
LICENSE.md 2025-11-11 02:07:51 +01:00
Makefile 2025-11-11 02:07:51 +01:00
README.md 2025-11-11 02:07:51 +01:00

Base64 for OCaml

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.

See also documentation.

Example

Simple encoding and decoding.

utop # #require "base64";;
utop # let enc = Base64.encode_exn "OCaml rocks!";;
val enc : string = "T0NhbWwgcm9ja3Mh"
utop # let plain = Base64.decode_exn enc;;
val plain : string = "OCaml rocks!"

License

ISC