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

storage: increase the number of bytes randomly generated for IDs
This commit is contained in:
Eric Chiang 2016-10-05 14:14:49 -07:00 committed by GitHub
commit c50b44cf8f

View File

@ -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)
}