使用MD5、SHA-1、SHA-256等算法从文本生成哈希值。
A cryptographic hash function is a mathematical algorithm that converts input data of any size into a fixed-size output (hash value or digest). Key properties include: deterministic (same input always produces same output), quick to compute, infeasible to reverse, and small changes in input produce drastically different outputs (avalanche effect).
Hash functions process input data through complex mathematical operations. The input is divided into blocks, and each block is processed through multiple rounds of transformations. The final result is a fixed-length string that uniquely represents the original data. Even a single bit change in the input creates a completely different hash.
MD5 is not recommended for security purposes due to known collision vulnerabilities. However, it's still acceptable for non-security uses like checksums for file integrity verification.
No, cryptographic hash functions are designed to be one-way functions. You cannot derive the original input from a hash. However, weak passwords can be cracked using rainbow tables or brute force.