Skip to content

mransan/base58

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Packages

No packages published