Hash functions are functions that map a bit vector to another bit vector, usually shorter than the original vector and usually of fixed length for a p

The Pluto Scarab — Hash Functions

submited by
Style Pass
2023-06-03 13:30:03

Hash functions are functions that map a bit vector to another bit vector, usually shorter than the original vector and usually of fixed length for a particular function.

Fast table lookup can be implemented using a hash function and a hash table. Elements are found in the hash table by calculating the hash of the element’s key and using the hash value as the index into the table. This is clearly faster than other methods, such as examining each element of the table sequentially to find a match.

Message digests allow you to compare two large bit vectors and quickly determine if they are equal. Instead of comparing the vectors bit-by-bit, if the hash values of each bit vector are available you can compare the hash values. If the hash values are different, the original vectors must be different. If the hash values are the same then the original vectors are very likely to be the same if the hash function is good.

Message digests can use either cryptographic or non-cryptographic hash functions. If the purpose of the message digest is to determine if the original message has been tampered with, you would need to use a cryptographic hash function. If you just want to quickly tell if it’s the same as another file with a different name (assuming the hash values have already been computed), you can use a non-cryptographic hash function.

Leave a Comment