Created
May 25, 2016 10:31
-
-
Save sillyfellow/4b42bee7c195f3853a5e2ed5e5fbaecc to your computer and use it in GitHub Desktop.
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
import ( | |
"crypto/rand" | |
"encoding/binary" | |
) | |
func randUInt32() (uint32, error) { | |
bytes := make([]byte, 4) | |
_, err := rand.Read(bytes) | |
return binary.BigEndian.Uint32(bytes), err | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment