what is hashing and when do you use it

702 views

Its different then regular encryption right?

In: Technology

5 Answers

Anonymous 0 Comments

Hashing is the same as encryption except its irreversible. Once you hash something, you can’t go back. In comparison, you can encrypt a message, send it to someone, and (assuming they have the key) they can decrypt it to read the original message.

The most obvious use-case for hashing is for password storage. Reddit doesn’t actually know your password; it knows a *hash* of your password. When you enter your password, Reddit will hash it and check if it matches their stored hash. The benefit here is that Reddit has none of the liability associated with knowing your password, and if there’s a database breach, you (should) still be safe. The hackers would know your hash but not your password (remember: you can’t go backwards!).

Another use-case is verifying data integrity. If I have a file, and you want to know if it’s changed since the last time you looked at it, we can both hash the file and compare. That way I don’t have to send you the entire file over a slow internet connection.

Use cases for hashing go on-and-on, but I’ll leave it there.

You are viewing 1 out of 5 answers, click here to view all answers.