MCPcopy Index your code
hub / github.com/coder/coder / entropy

Function entropy

coderd/gitsshkey/gitsshkey.go:35–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33)
34
35func entropy() io.Reader {
36 if flag.Lookup("test.v") != nil {
37 // This helps speed along our tests, esp. in CI where entropy is
38 // sparse.
39 //nolint:gosec
40 return insecurerand.New(insecurerand.NewSource(time.Now().UnixNano()))
41 }
42 // Buffering to reduce the number of system calls
43 // doubles performance without any loss of security.
44 return bufio.NewReader(rand.Reader)
45}
46
47// ParseAlgorithm returns a valid Algorithm or error if input is not a valid.
48func ParseAlgorithm(t string) (Algorithm, error) {

Callers 3

ed25519KeyGenFunction · 0.85
ecdsaKeyGenFunction · 0.85
rsa4096KeyGenFunction · 0.85

Calls 1

NewMethod · 0.65

Tested by

no test coverage detected