Hash function: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
Reverting edit(s) by 2405:201:C403:40DF:7099:20A9:484B:ADE0 (talk) to rev. 1223944782 by Guy Harris: Unexplained content removal (RW 16.1)
Line 4:
{{about|a computer programming construct|other meanings of "hash" and "hashing"|Hash (disambiguation)}}
{{More citations needed|date=July 2010}}
[[File:Hash table 4 1 1 0 0 1 0 LL.svg|thumb|240px|right|A hash function that maps names to integers from 0 to 15. There is a [[hash collision|collision]] between keys "John Smith" and "Sandra Dee".]]
 
A '''hash function''' is any [[Function (mathematics)|function]] that can be used to map [[data (computing)|data]] of arbitrary size to fixed-size values, though there are some hash functions that support variable length output.<ref>{{cite conference |last1=Aggarwal |first1=Kirti |last2=Verma |first2=Harsh K. |date=March 19, 2015 |url=https://ieeexplore.ieee.org/document/7164747 |title=Hash_RC6 — Variable length Hash algorithm using RC6 |doi=10.1109/ICACEA.2015.7164747 |conference=2015 International Conference on Advances in Computer Engineering and Applications (ICACEA) |access-date=January 24, 2023}}</ref> The values returned by a hash function are called ''hash values'', ''hash codes'', ''hash digests'', ''digests'', or simply ''hashes''.<ref>{{cite web|url=https://csrc.nist.gov/glossary/term/hash_digest|title=NIST Glossary — hash digest|access-date=January 1, 2024}}</ref> The values are usually used to index a fixed-size table called a ''[[hash table]]''. Use of a hash function to index a hash table is called ''hashing'' or ''scatter storage addressing''.