For the complete documentation index, see llms.txt. This page is also available as Markdown.

Hashing

Overview

This page contains recommendations for choosing a hashing algorithm.

General

Vulnerable hash algorithms
  • MD4

  • MD5

  • SHA-0

  • SHA-1

  • HAVAL-128

  • PANAMA

  • RIPEMD

Hashing implementation

Use the implementation of hash algorithms from the crypto package, such as crypto/sha256 or crypto/sha512. You can find the whole list at https://pkg.go.dev/crypto#Hash

Use the java.security.MessageDigest class for hashing implementation. MessageDigest is not thread-safe. Use a new instance for every thread.

Use the crypto package for hashing implementation. The list of supported algorithms is dependent on the available algorithms supported by the version of OpenSSL on the platform. Use openssl list -digest-algorithms to display the available digest algorithms.

Use the hashlib package for hashing implementation. You can find the list of available algorithms here.

Last updated