39var _ structs.Provider = &Client{}
40
41func init() {
42 rand.Seed(time.Now().UTC().UnixNano()) 43}
44
45func New(endpoint string) (*Client, error) {
79}
80
81func init() {
82 rand.Seed(time.Now().Unix()) 83}
84
85func FromEnv() (*Provider, error) {
38}
39
40func init() {
41 rand.Seed(time.Now().UnixNano()) 42}
43
44func Load(data []byte, env map[string]string) (*Manifest, error) {
24type Receiver chan Log
25
26func init() {
27 rand.Seed(time.Now().UTC().UnixNano()) 28}
29
30func New() Store {
As math/rand
uses a statistical random number generator, using a low entropy
seed (such as constants and the current system time) may allow an attacker to
predict what the following number generated is.
package main
import (
"math/rand"
"time"
)
func main() {
rand.Seed(42) // constant seeds are bad
rand.Seed(time.Now().Unix()) // time based seeds don't have sufficient entropy
}