Category: 

What is a Hash Algorithm?

Article Details
  • Written By: Jessica Reed
  • Edited By: Heather Bailey
  • Last Modified Date: 11 September 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
In late 19th-century London, mail was delivered to residential addresses up to twelve times each day.   more...

September 28 ,  1924 :  Two US military planes complete the first flights around the world.  more...

A hash algorithm, also known as a hash function, is a mathematical procedure used in computer programming to turn a large section of data into a smaller representational symbol, known as a hash key. The major use of hash algorithms occurs in large databases of information. Each collection of data is assigned a hash key, which is a short symbol or code that represents it. When a user needs to find that piece of data, he inputs the symbol or code and the computer displays the full data piece.

For hashing, as this process is called, to work it needs a hash function or hash algorithm. This tells the computer how to take the hash key and match it with a set of data it represents. Areas in the computer program known as slots or buckets store information and each key links to a specific slot or bucket.

To understand a hash algorithm fully, it's best to imagine a computer program working somewhat like a dictionary. Each letter of the alphabet represents a hash key. The pages that contain all the words starting with a certain letter count as a slot or bucket. If a person was searching for a list of words that begin with the letter A, he could type the letter A, which represents a key, into the computer and the hash algorithm would search for the slot that matches that specific key.

Ad

It would then retrieve all the pieces of data in that slot. In this case it would return all the words that started with the letter A. This example shows a simplified version of how a hash algorithm works. It may also link a hash key to one specific piece of data and only that piece of data would appear instead of multiple pieces.

The entire process is contained within a hash table or hash map. This table records data and the matching keys that correspond to it. It then uses a hash algorithm to connect a key to a piece of data when the user requests it. A researcher who is trying to compare similar recordings from his experiments might create a hash algorithm which assigns a key to any data that is similar. It would then show him all the similar pieces of data at once for him to compare.

Ad

You might also Like

Recommended

Discuss this Article

Post your comments

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}