3 ms·
If 32 bit keys are enough, skip32 [1] and then alphanumeric encoding [2] on an incrementing integer key. Both of those are reversible so you won't suffer from c
by asplake 6y ago
If 32 bit keys are enough, skip32 [1] and then alphanumeric encoding [2] on an incrementing integer key. Both of those are reversible so you won't suffer from collisions and you can get back your original integer key if you want.
In python:
[1] https://github.com/pyrige/skippy/blob/master/skippy/skippy.py https://github.com/pyrige/skippy/blob/master/skippy/skippy.p...
[2] https://gist.githubusercontent.com/adyliu/4494223/raw/0e21a012ba312776f41c15fb378cee5e1357bf70/base62.py https://gist.githubusercontent.com/adyliu/4494223/raw/0e21a0...