Create a bijection to get an unordered counter with known max
-
29-10-2019 - |
Question
I have a counter with a known maximum (called max
). max
can be big (actually it will be either 36^40 - 1
or 62^40 - 1
).
I want a bijection b
from [0..max]
to [0..max]
with the following property: b(n+1)
not easily guessable from b(n)
.
I am NOT searching for a cryptographically secure function, I just want as much entropy as possible to obfuscate a little the output of a counter.
The function must be doable in PHP. This allows all the functions PHP does.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow