I have a uuid
(e.g. a3989f5a-1c4b-11e3-8573-0025906a9230
) which I need to use as a seed for random number generation in ruby on rails.
Every time a request comes with said uuid
, I need to get the same sequence of random numbers generated. Is there any other such function that I am missing here?
Please note: it is very important that for a given uuid
, the same sequence of random numbers need to be generated every time.
I have tried using the Kernel.srand()
method provided by ruby, however this only accepts integers.