Random Password generator

Results 1 to 2 of 2

Thread: Random Password generator

  1. #1
    Farhan Shah Guest

    Default Random Password generator

    I want to generate two random password using ASP code and then save them in Access database. How will i do that ? any code for example ? <BR><BR>Thanks <BR>Farhan

  2. #2
    Join Date
    Dec 1969
    Posts
    2,849

    Default RE: Random Password generator

    Here is a routine that will generate a random string comprising of upper and lower case letters, as well as the digits.<BR><BR>&#060;%<BR> Dim strPass<BR> Randomize Timer<BR> <BR> Dim i, length, rndNumber<BR> length = 10<BR> i = 0<BR> strPass = ""<BR> <BR> while i &#060; length<BR> rndNumber = CInt(rnd(1) * 2)<BR> Select Case rndNumber<BR> Case 0:<BR> strPass = strPass & chr(CInt(rnd(1) * 25) + 65) <BR> Case 1:<BR> strPass = strPass & chr(CInt(rnd(1) * 25) + 97)<BR> Case 2:<BR> strPass = strPass & chr(CInt(rnd(1) * 9) + 48)<BR> End Select<BR> <BR> i = i + 1<BR> wend<BR>&#037;&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •