3 ms·
I dabbled with doing that. XTEA is a 64-bit block cipher, which suits 64-bit IDs pretty well, and well you can't really ask for much more without using larger I
by yencabulator 4y ago
I dabbled with doing that. XTEA is a 64-bit block cipher, which suits 64-bit IDs pretty well, and well you can't really ask for much more without using larger IDs. I use z-base-32 to stringify -- I considered base58, but I think case-sensitive URLs are not nice.
Looks like
user=1 doc=1
-> /users/a7e34gz71r4ig/documents/xs69f1c878rzq
user=42 doc=13
-> /users/am8hng8rnoopg/documents/9othzs4tgujrw
I have the code in Go (it's near-trivial), but ended up doing something else for that project.
Also, I hate that Postgres doesn't actually have unsigned integers.