Created
April 23, 2015 19:57
-
-
Save deankarn/7a8be1b042af717adeab to your computer and use it in GitHub Desktop.
Generates a random key and encodes into base64
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
key := securecookie.GenerateRandomKey(64) | |
encoded := base64.StdEncoding.EncodeToString(key) | |
decoded, _ := base64.StdEncoding.DecodeString(encoded) | |
log.Println(key) | |
log.Println(encoded) | |
log.Println(decoded) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment