Semicolony ELI5 · comic

Hash functions.

A blender that turns anything into a fixed-size fingerprint.

  1. In it goes.
    a a letter a book a 4 GB video
    1

    Feed in anything at all — a single letter, a whole book, a 4 GB video.

  2. whirr — mix it all
    2

    The hash function is the blender: it mixes and scrambles every byte.

  3. a3f9c1…7b2e always the same length out
    3

    Out comes a short fingerprint, always the same length whatever you put in.

  4. One typo, brand-new print.
    cat a3f9…7b2e car _ d8e2…01ff one letter, nothing alike
    4

    Same input, same fingerprint. Change one letter and it’s utterly different.

  5. hunter2 a3f9… no way back
    5

    It only runs forwards — there’s no un-blend button, which is why passwords are stored this way.

  6. Shelf 7. No searching.
    a3f9… shelf 7 · value jump straight there
    6

    Use the fingerprint as an address and you jump straight to a value — instant lookups.

Drop anything into the blender and the same short fingerprint always comes out — but you can’t un-blend it.
Semicolony semicolony.dev/eli5/hash-function/comic
← All ELI5 explainers