Nilef
Posts: 11 Join date: 2008-07-18
 | Subject: Password Generator Sat Jul 19, 2008 5:54 am | |
| This is a neat little code that will generate a random password | Code: | Dim iSel As Integer 'clear old passwords If Reset = True Then psw = "" End If For i = 1 To Lenght 'create random numbers that will represent 'each : upercase,lowercase,numbers
CNT(0) = rNum.Next(48, 57) 'Numbers 1 to 9 CNT(1) = rLowerCase.Next(65, 90) ' Lowercase Characters CNT(2) = rUpperCase.Next(97, 122) ' Uppercase Characters 'put characters in strings Char_Sel(0) = System.Convert.ToChar(CNT(0)).ToString Char_Sel(1) = System.Convert.ToChar(CNT(1)).ToString Char_Sel(2) = System.Convert.ToChar(CNT(2)).ToString
'pick one of the three above for a character At Random iSel = RandomSelect.Next(0, 3) 'colect all characters generated through the loop psw &= Char_Sel(iSel)
' reset with new password If Reset = True Then
psw.Replace(psw, Char_Sel(iSel)) End If
Next Return psw
End Function |
|
|
Biohazard Admin

Posts: 13 Join date: 2008-07-17
 | Subject: Re: Password Generator Sat Jul 19, 2008 6:07 am | |
| I don't understand it, Where does the generated password go? |
|
Nilef
Posts: 11 Join date: 2008-07-18
 | Subject: Re: Password Generator Sat Jul 19, 2008 6:10 am | |
| I think it appears in the box it was activated in. I found it in my little code library, never used it before, but im going to try and make a program with it. |
|
Biohazard Admin

Posts: 13 Join date: 2008-07-17
 | Subject: Re: Password Generator Sat Jul 19, 2008 6:20 am | |
| Good luck and post here when your done.  |
|
Nilef
Posts: 11 Join date: 2008-07-18
 | Subject: Re: Password Generator Sat Jul 19, 2008 6:21 am | |
| |
|