I've been trying to create my own random number library(in java). I've searched for randomization and Blum Blum Shub algorithm looks good. It needs a start value, it is not actually random. So i get unix timestamp mod(10) for first value. Now i can generate random numbers. My question is; how can i modify my structure with range? I mean, i want to generate that numbers in a range. (I don't want to use java's another classes or functions) Any advices? Thanks in advance.
EDİT:I coded $\ x(n+1)= x(n)^2mod(M) \\$ formula and gived x(0) unix timestamp's last digit and M=191. So i get random numbers with Blum Blum Shub. But i want to get that numbers in a range. It is not about my code. It is about the formula and method actually.