Skip to content
Snippets Groups Projects
Commit c50b44cf authored by Eric Chiang's avatar Eric Chiang Committed by GitHub
Browse files

Merge pull request #584 from ericchiang/dev-increase-entropy

storage: increase the number of bytes randomly generated for IDs
parents 98b207b5 490b3494
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,7 @@ var encoding = base32.NewEncoding("abcdefghijklmnopqrstuvwxyz234567")
// NewID returns a random string which can be used as an ID for objects.
func NewID() string {
buff := make([]byte, 8) // 64 bit random ID.
buff := make([]byte, 16) // 128 bit random ID.
if _, err := io.ReadFull(rand.Reader, buff); err != nil {
panic(err)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment