Last active
February 19, 2019 19:23
-
-
Save jlindsey/1dae306deaad753f6c244de3b7377743 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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