OCaml library for Crockford's Base32

Prepare for opam release

- Add Crockford Base32 spec link to OCaml documentation
- Add source and documentation fields to dune-project
- Fix OCaml doc references to Random module
- Update .gitignore for common build artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

+3
.gitignore
···
_build
.claude
+
*.install
+
.merlin
+
.DS_Store
+1
crockford.opam
···
authors: ["Anil Madhavapeddy"]
license: "MIT"
homepage: "https://tangled.org/@anil.recoil.org/ocaml-crockford"
+
doc: "https://tangled.org/@anil.recoil.org/ocaml-crockford"
bug-reports: "https://tangled.org/@anil.recoil.org/ocaml-crockford/issues"
depends: [
"dune" {>= "3.18"}
+2
dune-project
···
(maintainers "Anil Madhavapeddy <anil@recoil.org>")
(bug_reports "https://tangled.org/@anil.recoil.org/ocaml-crockford/issues")
(maintenance_intent "(latest)")
+
(source (uri "git+https://tangled.sh/@anil.recoil.org/ocaml-crockford"))
+
(documentation "https://tangled.org/@anil.recoil.org/ocaml-crockford")
(package
(name crockford)
+8 -3
lib/crockford.mli
···
Crockford Base32 is a base-32 encoding scheme designed by Douglas Crockford
for human-readable identifiers. It is particularly well-suited for use in URLs,
user-facing identifiers, and systems where humans need to transcribe or
-
communicate encoded values. It features:
+
communicate encoded values.
+
+
See the {{:https://www.crockford.com/base32.html}Crockford Base32 Specification}
+
for complete details of the encoding scheme.
+
+
It features:
{ul
{- {b Human-optimized alphabet}: Uses 32 characters (0-9, A-Z) but excludes
···
for use as database keys, URL-safe identifiers, or user-visible reference numbers.
When using the default [Random.float] generator, you must initialize the
-
random number generator with {!Random.self_init} before calling this function.
+
random number generator with [Random.self_init] before calling this function.
@param length The target length of the generated string. When [checksum:false],
this is the exact output length. When [checksum:true], this is the
···
Default: [false].
@param rng Custom random number generator function that takes a float bound and
returns a random float in the range [0,bound]. This allows for
-
deterministic testing or custom entropy sources. Defaults to using {!Random.float}.
+
deterministic testing or custom entropy sources. Defaults to using [Random.float].
@raise Decode_error with [Invalid_length] if [checksum] is [true] and [length < 3]
as at least 1 character is needed for the ID and 2 for the checksum. *)