'0' => 0 ... 'f' => 15, else sets *bad to true.
(b byte, bad *bool)
| 291 | |
| 292 | // '0' => 0 ... 'f' => 15, else sets *bad to true. |
| 293 | func hexVal(b byte, bad *bool) byte { |
| 294 | if '0' <= b && b <= '9' { |
| 295 | return b - '0' |
| 296 | } |
| 297 | if 'a' <= b && b <= 'f' { |
| 298 | return b - 'a' + 10 |
| 299 | } |
| 300 | *bad = true |
| 301 | return 0 |
| 302 | } |
| 303 | |
| 304 | func validDigestName(name string) bool { |
| 305 | if name == "" { |
no outgoing calls
no test coverage detected