I need to generate a sequence of random (pseudorandom do suit) strings in such a way that the probability of two strings in the sequence being the same is negligible.
So, how to obtain a sequence of pseudorandoms?
Internet Computer Loading tells something sophisticated about entropy. But I don’t need entropy, because pseudorandomness is enough for my purpose.
It provides SFC64 which is a known generator that is also part of numpy. The output is compatible with numpy.
It produces a sequence of Nat64 and you have to convert that to a string yourself. If it is a common use case then we could add that to the library (output as Text or Blob) for convenience.
It would be nice to add convenience functions to generate random values of other types than only Nat64. Hence the question what was the original requirement for the pseudo-random strings? Where they Blob or Text and what was the required character set?
I want to store results of the generator in Text DB keys in such a way that lexicographical order of keys matches order of the random numbers. The charset does not matter (except of, maybe, for debugging is better to use UTF-8 or even ASCII).