>So what password length are you using? Even a length of 7 puts the odds at several million to one.
>If that's not good enough you could include numbers and/or case sensitive alphas.
>But how many users are you expecting and what are the real consequences of generating two identical consecutive passwords?
>Do you envisage either party being able to make use of the fact (even if they knew it had occurred)?
>IAC, if you really cannot accept consecutive identical values then you have no option except to check them as they are generated.
Like I said, it is not about getting unique values over a long period. It is just that the random is not affected if I call the function twice in a row. I have to wait at least a second so the second call to the method would be returned ok with a different values.