What are the hash?
Hashes are mathematical formulas that take a string of variable length data, usually in the form of text, and convert them to shorter numeric values with fixed length. Hashes are often used in computer databases to make searching quickly and more efficient. They are also used in encryption to ensure that passwords are not at risk and verify, among other things, digital signatures. Hashes also passes through the name of the hash functions and can also be considered algorithms.
Hashes plays a big role in facilitating the database. In a database consisting of names, for example, if the user searches "John Doe", the computer would have to compare all characters when searching for those from each database item. Each character in the name would have 26 different options - the letters of the English alphabet - while the variable length of items would also slow down the search.
On the other hand, the use of Hashomputer's life is much easier. Transforming each text string into a number of numbers would simplify the search becausee The computer would only have ten options to check each character: digits "0" on "9.". The fixed length of the number of numbers also helps the computer more efficiently to perform their work.
In the database using hash function, all items have a corresponding unique number. This is called the key hash. In this case, when you make a search, the computer first uses the hash for the input you wrote, such as "John Doe". This results in a numerical value, such as "456789." The computer can then quickly customize this result with the hash key corresponding to the correct item.
Hashes also act as digital signatures. For example, the sender, Robert, wants to send a document to someone and the recipient, Mary, wants to ensure that the document is not tamoted with on the way. The Robert sender must only run the document via a hash function, resulting in a numerical value. Robert then encrypts the hash key and sends dockMent along with an encrypted key.
Mary receives both items and decrypts the key hash. He can now see the numeric value that has resulted from the document before sending it. To verify that the document in its hands is exactly the same, it starts the document via a hash function on its computer. Finally, it compares both keys. If they are the same, then the document has not changed on the way to the recipient.
There are many different hash of which each has its own mathematical formulas. To function hash, it must minimize any collision that occurs when two database items have the same hash key. The hash function must also be one -way. This means that you can create a key from an item or a database document, but not the other way around. In other words, you cannot "reverse engineer" the original document from its hash key.