A small, fast library for generating cryptographically secure, URL safe IDs.
To use this with your Go project:
$ go get github.com/Kaamkiya/nanoid-go
It's a simple library, and it exports only one function and two constants.
To use the defaults:
import "github.com/Kaamkiya/nanoid-go"
nanoid.Nanoid(nanoid.DefaultLength, nanoid.DefaultCharset)
More complete examples can be found in _examples/
.
- Cryptographically secure - it uses a secure random number generator to make the IDs.
- Fast.
- Small - the only import is in the standard library.
- URL safe - it only uses URL safe characters, unless you want it to use more.
This project uses the Unlicense.
Thanks to all of the contributors: