package nanoid

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Native, customizable implementation of Nano ID. Unless you specifically want to customize random number generation, you should probably use the simpler nanoid library, which uses the Simple () implementation from this library.

module type RNG = sig ... end

Random bytes generator

module type S = sig ... end

Nano ID generator

val pseudo_seeded : string -> (module RNG)

pseudo_seeded seed is a RNG module that generates pseudo random numbers based on the given seed. It is subject to the same limitations as Cryptokit.Random.pseudo_rng

module Make (Rng : RNG) : S

Make (Rng) is a Nano ID generator based on random number generator Rng

module Simple () : S

Simple () is a Nano ID generator based on the pseudo_seeded random number generator seeded with the current system time as given by Unix.gettimeofday.

OCaml

Innovation. Community. Security.