Information Security -- How to hack a password. One particular use case for hashing is for user authentication. Given an original object (password, file, image, etc), the content is hashed into SHA1, or MD5, and stored in database. So, even the application could not revert a given hashed object to its original content. To authenticate, the user will supply an original object {password, file, image, etc}. the same hash routine is applied to produce a hashed object. This hashed object is compared with one stored in the database looking for a match.