DEV Community

Brijrajsinh parmar
Brijrajsinh parmar

Posted on

2 1

Hashing, Explain it to me like I'm 5.

Image description

As each person has its own signature, so do files.

For files, it’s called hash and it’s calculated based on the numbers of 0’s and 1’s that actually compose that file.

At the low level, each file is a bunch of zeros and ones, or bits.
Now, as a person can’t replicate exactly another person’s signature, so no two files have the same hash.

What’s more, when you change a file, its hash changes, too, because the bits contained in it change.

This is easier to understand if I show you this example:
Image description

You see that I have two strings (text) almost identical above.
I calculated the hash for the string “Hello”.

Now look what happens if I only change the first letter to lowercase (“hello”).

You see that I get two completely different values and I only changed a byte of the string (=8 bits. Each character in the string is 8 bits, aka 1 byte).

These features of a hash value allow you to make sure no changes were made to a file and it’s therefore safe.

Hope a 5-year old gets that :)

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay