Skip to content

Instantly share code, notes, and snippets.

@ynkdir
Created November 3, 2015 11:10
Show Gist options
  • Save ynkdir/98749f56bc9875eab297 to your computer and use it in GitHub Desktop.
Save ynkdir/98749f56bc9875eab297 to your computer and use it in GitHub Desktop.
dassword
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"log"
)
func main() {
b := make([]byte, 40)
_, err := rand.Read(b)
if err != nil {
log.Fatal(err)
}
s := base64.StdEncoding.EncodeToString(b)
fmt.Println(s)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment