crypto/md5

Guided tour · Crypto · pkg.go.dev →

MD5 hashing. BROKEN for security use. Only for non-security checksums like ETags or dedup.

Usage

Sum

sum := md5.Sum([]byte("hello"))
fmt.Printf("%x\n", sum)

When to still use MD5

Legitimate uses: cache keys, ETags, file-level dedup where collisions are not adversarial. For literally anything security-related use SHA-256 or stronger.