mransan / base58

Base 58 Encoding for OCaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Base 58 Encoding OCaml library

This library provide encoding and decoding function for the Base 58 encoding.

Install

opam install base58 

Documentation

OCamldoc generated doc can be found here.

Example

let () = 
  let alphabet = B58.make_alphabet "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" in 
  let data     = Bytes.of_string "Hello World"  in 
  let b58      = B58.encode alphabet data in 
  print_endline @@ Bytes.to_string b58

Then to compile:

ocamlbuild -use-ocamlfind -pkgs base58 example01.native

About

Base 58 Encoding for OCaml


Languages

Language:OCaml 89.8%Language:Makefile 10.2%