MCPcopy Index your code
hub / github.com/smallstep/cli / assertCryptoRand

Function assertCryptoRand

command/ca/init.go:816–823  ·  view source on GitHub ↗

assertCryptoRand asserts that a cryptographically secure random number generator is available, it will return an error otherwise.

()

Source from the content-addressed store, hash-verified

814// assertCryptoRand asserts that a cryptographically secure random number
815// generator is available, it will return an error otherwise.
816func assertCryptoRand() error {
817 buf := make([]byte, 64)
818 _, err := io.ReadFull(rand.Reader, buf)
819 if err != nil {
820 return errs.NewError("crypto/rand is unavailable: Read() failed with %#v", err)
821 }
822 return nil
823}
824
825// processDNSValue reads DNS names from user supplied DNS value
826// and transforms it into DNS names and IP addresses.

Callers 1

initActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…