ID
NanoID#
A Go implementation of NanoID
↗
.
NanoID can be expressed as regex [A-Za-z0-9_-]{21}
. NanoID is case-sensative.
In contrast to UUID v4,
- similar collision probability.
- shorter: NanoID uses a larger alphabet (64 vs 16), and therefore shorter size (21 vs 36) under similar collision probability.
- safer: NanoID uses a cryptographically secure random generator.
Use#
Benchmark#
UUID#
UUID v4 and secure UUID v4.
UUID v4 uses a pseudo-random generator.
Secure UUID v4 uses a cryptographically secure random generator.
Use#
Benchmark#