Cryptography hashing cryptography security

What is MD5 Hash?

Definition

MD5 (Message-Digest Algorithm 5) is a widely used hash function that produces a 128-bit (32 hex character) hash value. It converts any input into a fixed-length fingerprint. MD5 is fast but cryptographically broken — collisions can be deliberately generated.

Why It Matters

MD5 is still commonly used for file integrity checks (checksums), cache keys, and non-security deduplication. However, it must NOT be used for passwords or digital signatures because collision attacks are practical. Use SHA-256 or bcrypt for security purposes.

Code Example

import hashlib
hash_value = hashlib.md5(b'Hello, World!').hexdigest()
print(hash_value)  # 65a8e27d8879283831b664bd8b7f0ad4

Language: python

Frequently Asked Questions

Is MD5 still safe to use?

Not for security purposes. MD5 is cryptographically broken — collision attacks are practical. Use SHA-256 for integrity verification and bcrypt/Argon2 for password hashing.

Related Free Tools

Related Terms