377 contentType = "application/octet-stream"
378 }
379
380 etag := fmt.Sprintf("%x", md5.Sum(data))381
382 if match := ctx.Headers("If-None-Match"); match != "" {
383 if strings.Contains(match, etag) {
MD5 is cryptographically broken and should not be used for secure applications. It is recommended to use better replacement algorithms instead.
MD5 is widely used as a hash function for producing 128-bit hash value but it suffers from extensive vulnerabilities and it highly recommended to not use MD5.
h := md5.New()
_, _ = io.Copy(h, f)