Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Understanding Hash Functions and Keeping Passwords Safe

Share this post!
 Vote this!

From time to time, servers and databases are stolen or compromised. With this in mind, it is important to ensure that some crucial user data, such as passwords, can not be recovered. Today, we are going to learn the basics behind hashing and what it takes to protect passwords in your web applications.

 What Does “Hashing” Do?

"Hashing converts a piece of data (either small or large), into a relatively short piece of data such as a string or an integer. "

This is accomplished by using a one-way hash function. “One-way” means that it is very difficult (or practically impossible) to reverse it.
A common example of a hash function is md5(), which is quite popular in many different languages and systems.

With md5(), the result will always be a 32 character long string. But, it contains only hexadecimal characters; technically it can also be represented as a 128-bit (16 byte) integer. You may md5() much longer strings and data, and you will still end up with a hash of this length. This fact alone might give you a hint as to why this is considered a “one-way” function.

More...

 

0 comments:

Post a Comment