5// https://www.jianshu.com/p/5b6f7110eb52
6
7func MD5(value []byte) []byte {
8 hashValue := md5.New() 9 hashValue.Write(value)
10 hashResult := hashValue.Sum(nil)
11 return hashResult
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)