Unique password generator

Results 1 to 5 of 5

Thread: Unique password generator

  1. #1
    Martin Olsson Guest

    Default Unique password generator

    I am looking for an algorithm to generate a unique password that will be mailed to users who apply for membership on my site.<BR><BR>I will have access to e-mail and user name - how do I assure that passwords generated are unique and that it is impossible to "reverse engineer" the system to extract passwords?<BR><BR>Using the system time as random seed could be part of the algorithm, but how do I assure that the password generated is unique (short of looking through the password database every time a new user is added).<BR><BR>Regards,<BR><BR>Martin Olsson<BR>martin@olsson.com<BR>Uppsala, Sweden

  2. #2
    Join Date
    Dec 1969
    Posts
    760

    Default RE: Unique password generator

    You could append something not random to the password.<BR>For example : your password could be your username plus a random string

  3. #3
    Join Date
    Dec 1969
    Posts
    168

    Default RE: Unique password generator

    There is probably an easier way of doing this... (I have excluded captial and lower case "L", zero, the captial letter "O" and one to avoid confusion.)<BR>a 8 letter random generated password with these exceptions is unique to approx 1 in 300,000,000. If you combine the email address and password, you should end up with a unique combination. <BR><BR>&#060;%<BR>Function makepwd(s)<BR>&#039 where "s" is the number of characters in the password<BR>Dim A<BR>A = Array("A","a","B","b","C","c","D","d","E","e","F", "f","G","g","H","h","J","j","K","k","M","m","N","n ","o","P","p","Q","q","R","r","S","s","T","t","U", "u","V","v","W","w","X","x","Y","y","Z","z","2","3 ","4","5","6","7","8","9")<BR>makepwd = ""<BR>for i=1 to s<BR> Randomize<BR> var= INT((54 * RND) + 1)<BR> makepwd= makepwd & A(var)<BR>next<BR>End Function<BR>%&#062;<BR><BR>Hope this helps... Cheers!

  4. #4
    Martin Olsson Guest

    Default RE: Unique password generator

    That&#039s exactly the kind of solution I was looking for. Thanks! I hadn&#039t done the math to figure out just how likely a duplicate of a random 8 char password would be. Think I&#039ll use the first four or five characters of the username + 8 random characters.<BR><BR>Regards,<BR><BR>Martin Olsson


  5. #5
    Endar Goth Guest

    Default RE: Unique password generator

    Here is another one...same stuff...with some MonthName characters mixed in.<BR><BR>&#060;select name="customer_password"&#062;<BR>&#060;%For i = 1 to 20%&#062;<BR>&#060;%<BR>RANDOMIZE<BR>new_password = INT((90000+10000)*RND) & Left(LCase(MonthName(Month(Now),true)),1) & INT((90000+10000)*RND) & Right(UCase(MonthName(Month(Now),true)),1)<BR>%&#0 62;<BR>&#060;option value="&#060;%=new_password%&#062;"&#062;&#060;%=n ew_password%&#062;&#060;/option&#062;<BR>&#060;%Next%&#062;<BR>&#060;/select&#062;

Posting Permissions

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