Hash your contacts' phone numbers with Argon2 and a secret key, so WhatsApp shows you an unreadable hash instead of a name. Nobody, not even you, will know who's texting until you check the table.
Just adding complexity to my WhatsApp.
You need two files, both in the same directory as the binary:
secret.key — a random hex string. Generate one with:
openssl rand -hex 32 > secret.keyDon't lose it. Without it, nobody can reproduce your hashes even with the same phone number.
contacts.txt — one contact per line, this exact format:
XXXXXXXXX "Kevin"
XXXXXXXXX "Mama"
No spaces in the phone number. Name in double quotes.
gcc main.c -o whowasthis -largon2
./whowasthisOutput:
Kevin -> 8e77e91a3f
Mama -> d760c506a1
- Deterministic: same phone and same key = same hash gives you the same result.
- Truncated to 5 bytes (10 hex chars) — that's ~2^40 possible values.
- If you're planning on having more than 2^40 ≈ 10^12 contacts, per the
birthday bound you'll start seeing collisions around 2^20 (~1M) of them.
At that point please reconsider your life choices, or just bump
HASH_LENoutput loop to print more bytes. The full Argon2 hash is 32 bytes (2^256 space), which should cover you up to roughly one contact per atom in the observable universe.