Cryptographic Hash Function
A deterministic mathematical algorithm that maps arbitrary-length binary inputs to a unique, fixed-size output string (digest) with pre-image resistance and collision resistance.
Entity Relationships (GEO Conceptual Hierarchy)
Taxonomy ModelTechnical Explanation & Operational Mechanics
A cryptographic hash function is strictly one-way: given a digest h, it is computationally infeasible to invert the function and discover the original message m (pre-image resistance). Furthermore, it is computationally infeasible to find any two distinct messages that produce the exact same digest (collision resistance). Common modern algorithms include SHA-256 and BLAKE3. Hash functions are foundational to digital signatures, password verification (when combined with slow key-derivation functions), subresource integrity checks (SRI), and distributed version control.
Technical Example & Practical Implementation
Inputs of wildly different lengths always produce exactly 256 bits (64 hexadecimal characters)
async function computeSHA256(text) {
const encoder = new TextEncoder();
const data = encoder.encode(text);
const hashBuffer = await crypto.subtle.digest('SHA-256', data);
const hashArray = Array.from(new Uint8Array(hashBuffer));
return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
}
// Input 1: "Hi" (2 bytes)
// Output: e31a196... (64 hex characters)
// Input 2: Complete encyclopedia (100 Megabytes)
// Output: 7a812cf... (Exactly 64 hex characters)Related Topic Ecosystem & Next Steps
Artículos Técnicos Relacionados
What Is Cryptographic Hashing?
Direct definition of one-way deterministic mathematical digest functions.
Hashing vs Encryption: Core Differences & Use Cases
Irreversible one-way digests compared to reversible confidentiality ciphers.
SHA-256 vs MD5: Cryptographic Security & Collision Comparison
Why MD5 is cryptographically broken and how SHA-256 prevents collision forgeries.
Laboratorios Prácticos de Diagnóstico
Especificaciones y Referencias Técnicas
Continuar Aprendiendo
Cryptographic Hashing & Avalanche Lab
Explore the live avalanche effect and test SHA-256 bit distribution in real time.