Cybersecurity

What is Hashing?

Quick answer

Transforming data of any size into a fixed-length string, called a hash, using a one-way mathematical function.

Hashing, explained

A hash function takes an input, such as a password or a file, and produces a fixed-size output that looks random. The same input always gives the same hash, but even a tiny change produces a completely different result, and it should be practically impossible to reverse the process.

Hashing has many uses. Websites store password hashes instead of actual passwords, ideally with slow, salted algorithms such as bcrypt or Argon2. File downloads publish a hash so you can verify nothing was altered. Blockchains link blocks using hashes of previous blocks. Common algorithms include SHA-256; older ones like MD5 and SHA-1 are considered broken for security purposes. Hashing differs from encryption, which is designed to be reversible with a key.

Related terms

Guides that mention Hashing