Tag: hashing

What is hashing in c?

February 22, 2010 | Filed Under C | 1 Comment

Hashing is a process for  message digest. Hash  value  is the collection of text.

Producing hash values for accessing data or for security. A hash value (or simply hash), also called a message digest, is a number  generated from a string of text. The hash is substantially smaller than the text itself, and is generated by a formula in such a way that it is extremely unlikely that some

Hashing is also a common method of accessing data records. Consider, for example, a list of names:

  • John Smith
  • Sarah Jones
  • Roger Adams
  • To create an index, called a hash table, for these records, you would apply a formula to each name to produce a unique numeric value. So you might get something like:

  • 1345873 John smith
  • 3097905 Sarah Jones
  • 4060964 Roger Adams
  • Then to search for the record containing Sarah Jones, you just need to reapply the formula, which directly yields the index key to the record. This is much more efficient than searching through all the records  till the matching record is found.

    Article written by admin

    © PHPInterviewQuestion.com 2009 - 2012

    eXTReMe Tracker