It uses the first 13 hexadecimal characters (out of the 32) of the MD5
hash of the input, and converts them into an adjective-animal form to
create a human readable hash.
Number of possible hash values
hash_animal()
uses 1748 animal names and
8946 different adjectives. The number of
different hashes you can get for different values of n_adj
:
n_adj | size of the hash table space |
0 | 1,748 |
1 | 15,637,608 |
2 | 139,894,041,168 |
3 | 1,251,492,092,288,928 |
Source
The list of adjectives and animals comes from the ids package,
and in turn from
https://github.com/a-type/adjective-adjective-animal, and
from https://gfycat.com
(now gone).
hash_raw_animal()
calculates the adjective-animal hash of
the bytes of a raw vector.
hash_obj_animal()
calculates the adjective-animal hash of
an R object. The object is serialized into a binary vector first.