I just released the first version of kpermute: a Kotlin library for fast, deterministic integer (and long and unsigned) permutations. It’s built for shuffling enormous integer domains/lists (or for data obfuscation) in a memory-constant, reversible way.
🔗 Check it out: https://github.com/Eigenity/kpermute
Thanks for any feedback, pats on the back, or subtle nods of approval.
🔥 3
a
Anonymike
11/10/2025, 5:20 PM
Interesting share @Rasmus Ros and thank you. It looks like one use-case example for this library might be providing anonymous user ids for an analytics API without giving the origin id away. Seems like you could use a different seed for each business using the api so differentiation of the same profiles across businesses would remain anonymous.
Do I have the right idea conceptually? We do something like this for a commerce api so different clients (or the same integrator) can't track the same end user across websites or properties.
r
Rasmus Ros
11/10/2025, 5:30 PM
Yes that's right
a
Anonymike
11/10/2025, 5:37 PM
Awesome! Love seeing libraries like this and they're too often unappreciated. Maybe a list of use case descriptions like I mentioned above isn't a bad thing, though I can understand being careful to avoid certain recommendations.
Anonymike
11/10/2025, 5:37 PM
Thanks again
r
Rasmus Ros
11/10/2025, 5:40 PM
Yeah I had it in the README but messes up the link. But yeah if it's really important with the obfuscation you should use a real crypto
a
Anonymike
11/10/2025, 5:42 PM
We did a cryptographic version originally because we are passing the data out in one or two records at a time, but I can absolutely see where this would help with bulk data. What we did is not super feasible for large exports, etc.