MD5 Encryption Tool
MD5 Documentation
MD5 (Message Digest Algorithm 5) is a widely used hash function that produces a 128-bit hash value, typically expressed as a 32-character hexadecimal number. While MD5 was previously used for data integrity verification and password storage, it is no longer recommended for security-sensitive applications due to collision vulnerabilities.
MD5 Key Features
- Fixed-length output: Always generates 32-character hexadecimal regardless of input length
- Irreversibility: Original content cannot be derived from the hash value
- Avalanche effect: Small input changes result in significantly different outputs
JavaScript Implementation
// 安装crypto-js库:npm install crypto-js
import md5 from 'crypto-js/md5';
const input = 'input';
const hash = md5(input).toString();
Python Implementation
import hashlib
def generate_md5(text):
return hashlib.md5(text.encode('utf-8')).hexdigest()
print(generate_md5('input'))
Security Notes
- Not recommended for security-sensitive scenarios like password storage
- Consider using more secure algorithms like SHA-256 or bcrypt
- Suitable for non-cryptographic uses like file verification and data fingerprinting