The function emojid()
deterministically converts hexadecimal strings (like sha1sum, md5sum, uuid4, uuid5) into emoji containing strings, remojid()
converts back.
Implementations in Javascript and Python are provided.
¯\_(ツ)_/¯
The code will in each step
- take the value of 2 hex chars
- add a "magic" offset (U+1F400) to it
- convert it to unicode
There is a bit of tolerance built in: Non hex chars will be ignored and simply be added to the result. But I wouldn't push it too hard.
md5
emojid(42eab827e162899feb01af513c39be46) =>👂📪💸🐧📡👢💉💟📫🐁💯👑🐼🐹💾👆
shasum
emojid(d50aabf4b2f62569b976a4b16d6dfc86750499a7) => 📕🐊💫📴💲📶🐥👩💹👶💤💱👭👭📼💆👵🐄💙💧
git short hash
emojid(21132ad) => 🐡🐓🐪d
uuid4
emojid(f6e3299a-525a-4c5f-bebc-ef014b608a66) => 📶📣🐩💚-👒👚-👌👟-💾💼-📯🐁👋👠💊👦
reverse
remojid(🐡🐓🐪d) => 21132ad