fmalk

Fernando Piancastelli

Posted on June 14, 2024

Hash Function 256 chars

This is a submission for DEV Computer Science Challenge v24.06.12: One Byte Explainer.

Explainer

A hash function takes a key or input data and maps it to a fixed-size, uniformely distributed value (hash), later used for data retrieval. It strives to be fast, only generate one possible hash per input and make key mapping possible in near constant time.

Additional Context

Hashes are hard to define because it has many similar concepts in the field, which are used almost interchangibly; it is especially hard not to confuse them with checksums - those are interested in data integrity, not mapping. Also, results uniformely distributed is an essential property to make use of the hash value constant in time, since no hash is more probable than another from the same function.
Another important distinction is to separate general hash functions to cryptographic ones: the latter takes computational effort to make a 1 to 1 mapping to input (any one input can only be represented by one hash) and to make the original input unguessable by the hash alone, among other differences.

💖 💪 🙅 🚩
fmalk
Fernando Piancastelli

Posted on June 14, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Dev challenge - Algorithms
devchallenge Dev challenge - Algorithms

June 24, 2024

One Byte Explainer: Large Language Models
Data Compression: Under 256 characters
devchallenge Data Compression: Under 256 characters

June 24, 2024