Skip to content

Instantly share code, notes, and snippets.

Last active April 29, 2022 02:59
What would you like to do?
DoltLab `gentokenenckey`
package main
import (
crand "crypto/rand"
func main() {
r := make([]byte, 32)
_, err := io.ReadFull(crand.Reader, r)
if err != nil {
fmt.Printf("%v\n", base32.NewEncoding("0123456789abcdefghijklmnopqrstuv").WithPadding(base32.NoPadding).EncodeToString(r))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment