|
-
November 25th, 2011, 04:13 AM
#2
Re: Help! Password Generator
Problem 1: The line which prints the password is inside the loop - so as the password array is populated with each character, it will be printed out.
Problem 2: You are populating the password array with random chars from the range 33 (!) to (33 + 122 = 155) - but characters above 126 are 8 bit characters and may well display as hieroglyphics.
It looks like you initialise an array with the legal characters so you should be selecting a random character from that array. Try generating a random number N between 0 and length of arrayHex, then add arrayHex[N] to the password array.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|