Generating Passwords
843838Jun 16 2007 — edited Jan 15 2009Aye,
I want to generate passwords automatically. In the user-add-script I wrote, the one who is adding the new users is not to pick the passwords due to several irrelevant reasons.
My script already works, using the timestamp as password, but 14849248294829 isn't really a user-friendly password. I'd rather have a randomly generated password existing out of 6 or 8 letters. I do have a plan in pseudo code, but I just can't figure out how to convert it into actually working JSP.
Here's what I want to do:
[pseudo]
String[] letters = a,b,c (...)
for (i=0, i<9, i++){
Randomly pick letters from the array.
}
String pass = above blabla.
[pseudo]
I guess that's a fair way of generating the passwords, but I haven't figured out how to actually program it properly.
Does someone have any idea?