deepsourcestatus / test-repository

Random number generator seed doesn't have enough entropy GO-S1033
Security
Major
8 months ago8 months old
Time based seeds have insufficient entropy
 8)
 9
10func randomSeed() uint32 {
11	rand.Seed(time.Now().UnixNano())12	seeds := []uint32{0xCAFE, 0xcaFE, 0xcafe, 0xCAAF, 0xFACE}
13	min, max := 0, len(seeds)-1
14	return seeds[rand.Intn(max-min+1)+min]