Skip to content

Instantly share code, notes, and snippets.

@jlindsey
Last active February 19, 2019 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlindsey/1dae306deaad753f6c244de3b7377743 to your computer and use it in GitHub Desktop.
Save jlindsey/1dae306deaad753f6c244de3b7377743 to your computer and use it in GitHub Desktop.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
)
func main() {
buf := make([]byte, 64)
_, err := rand.Read(buf)
if err != nil {
panic(err)
}
fmt.Println(base64.StdEncoding.EncodeToString(buf))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment