(user string, pwd string)
| 299 | return h.Sum32(), nil |
| 300 | } |
| 301 | func calcCredentialHash(user string, pwd string) (uint32, error) { |
| 302 | h := fnv.New32a() |
| 303 | _, err := h.Write([]byte(user + pwd)) |
| 304 | return h.Sum32(), err |
| 305 | } |
| 306 | |
| 307 | // Function to read the request body and return it as a byte slice. |
| 308 | // It also restores the req.Body to be used again. |