Possible Duplicate:
Creating a unique alphanumeric 10-character string
I need to generate unique random passwords.
So I thought of doing something like MD5(counter+a_random_string+timeInMills)
but this has a 32 chars output.
I need a 8 chars passwords.
How can generate unique custom length human-readable passwords?
Update:
I generate N (less that 30) passwords each time and I need these N password be non-redundant. The need of uniqueness is not absolute.
Also checking generated password for repeated value and re-generating it can cause an infinite loop