---
title: "Hashing: a fingerprint is not security"
summary: "What a hash is, how to compute md5 and sha256 with the shell and Python, what a fingerprint can prove, and why md5 is not protection."
url: "https://lab.blue-unlimited.com/en/learn/hashing-is-not-security"
language: en
updated: "2026-10-25"
---

[Home](https://lab.blue-unlimited.com/en) / [Learn](https://lab.blue-unlimited.com/en/learn) / Hashing: a fingerprint is not security

**Guide · Security basics**

# Hashing: a fingerprint is not security

What a hash is, how to compute md5 and sha256 with the shell and Python, what a fingerprint can prove, and why md5 is not protection.

- **Reading time**: 7 min
- **Tested on**: 2026-10-25

What a hash is, how to compute md5 and sha256 with the shell and Python, what a fingerprint can prove, and why md5 is not protection.

## In plain words

A hash is a fingerprint for data. Give it a word or a whole file and it gives back a short code. The same input always gives the same code, and changing one letter gives a completely different one. You cannot rebuild the file from the code.

## Try it yourself

Try it in the terminal. `-n` stops `echo` from adding a line break, which would change the fingerprint:

```bash
echo -n hello | md5sum
echo -n hellp | md5sum
echo -n hello | sha256sum
```

The first line should read `5d41402abc4b2a76b9719d911017c592`. Same thing in Python, and for a whole file:

```bash
python3 -c 'import hashlib; print(hashlib.md5(b"hello").hexdigest())'
md5sum /etc/os-release
```

Change one letter in `app.py`, save, and run `md5sum` again.

## A step further

A fingerprint proves that a file **arrived unchanged**: compare the code you were given with the one you computed. That is its job.

It is **not security**. md5 is old and broken: people can make two different files with the same md5, so it must never protect anything. For checks use sha256. Passwords are never stored as a plain hash of any kind: they need a slow, salted method (bcrypt, argon2).

So an `md5` field in an API answer is a fingerprint for the client to check, not protection.

## How it works in real projects

Software downloads publish a sha256 next to the file. Git itself names every commit by a hash. Password systems use slow salted hashes so a stolen database is hard to use.

## Tools in this guide

- [AI Workshops](https://lab.blue-unlimited.com/en/ai-workshops) (More time, Internal): AI agents and skills built around your processes and your voice, and your team trained to work with them safely.

## Not sure where to start? Tell us what's slowing you down. Let's chat.

[Let's chat](https://lab.blue-unlimited.com/en/contact?cta=chat&item=hashing-is-not-security)
