Created
November 3, 2015 11:10
-
-
Save ynkdir/98749f56bc9875eab297 to your computer and use it in GitHub Desktop.
dassword
This file contains 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" | |
"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