assertCryptoRand asserts that a cryptographically secure random number generator is available, it will return an error otherwise.
()
| 814 | // assertCryptoRand asserts that a cryptographically secure random number |
| 815 | // generator is available, it will return an error otherwise. |
| 816 | func 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. |
no outgoing calls
no test coverage detected
searching dependent graphs…