Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 623 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 623 Bytes

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