(byteLen int)
| 14 | } |
| 15 | |
| 16 | func randomHex(byteLen int) string { |
| 17 | buf := make([]byte, byteLen) |
| 18 | if _, err := rand.Read(buf); err != nil { |
| 19 | // Fallback to deterministic zero value is acceptable for safety. |
| 20 | return hex.EncodeToString(make([]byte, byteLen)) |
| 21 | } |
| 22 | return hex.EncodeToString(buf) |
| 23 | } |
no outgoing calls
no test coverage detected