sumHMAC calculate hmac between two input byte array.
(key, data []byte)
| 36 | |
| 37 | // sumHMAC calculate hmac between two input byte array. |
| 38 | func sumHMAC(key, data []byte) []byte { |
| 39 | hash := hmac.New(sha256.New, key) |
| 40 | hash.Write(data) |
| 41 | return hash.Sum(nil) |
| 42 | } |
| 43 | |
| 44 | // getHostAddr returns host header if available, otherwise returns host from URL |
| 45 | func getHostAddr(req *http.Request) string { |
no outgoing calls
no test coverage detected