Advertisement
digininja

Go Nonce Generator

Dec 4th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.26 KB | None | 0 0
  1. Does this function only ever return "AAAAAAAAAAAAAAAAAAAAAAAA"?
  2.  
  3. func generateNonce() string {
  4.     b := make([]byte, 15)
  5.     rand.Read(b)
  6.     en := base32.StdEncoding
  7.     d := make([]byte, en.EncodedLen(len(b)))
  8.     en.Encode(d, b)
  9.     return string(d)
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement