From the best that I can tell, the technical term for what you are trying to generate is called a "nonce"- a randomized number that is never used more than once, classically used to prevent replay in authentication protocols. If security is a real concern, your best bet will be to research standard authentication protocols and implement a proven scheme that meets your needs rather than trying to role one yourself. If you are just trying to stop someone from guessing an account number after three or four tries, you could probably get away with just using rand or Math::TruelyRandom and keep track what values have already been assigned in a hash or in some other way.
Also, if you want, post your expectation for the total number of nonces generated, and the expected rate that they will assigned and we can do some back-of-the-envelope calculations as to if a 6 digit number will be sufficient.
Good luck,In reply to Re: Re: Re: Generating random 6 digit numbers
by cmumikey
in thread Generating random 6 digit numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |