generating unique passwords

Results 1 to 2 of 2

Thread: generating unique passwords

  1. #1
    Join Date
    Dec 1969

    Default generating unique passwords

    I am generating unique passwords in a system<BR> ..... i know this must be an old chestnut ..<BR>using sql guids / or similar the passwords are always<BR>too consecutive ....<BR>has anyone got a good piece of code i can steal<BR><BR>thanks<BR> simon

  2. #2
    Join Date
    Dec 1969

    Default RE: generating unique passwords

    If you want to do something like this, I personally would decide what other information I want to hold about a user.<BR><BR>For example, if it may be nice to know when they registered, be sure to include the date in their password when it&#039;s generated - you can always un-generate it at a later date to find their registration date.<BR><BR>Also, if you want the password to be unique then include their username and/or email address in it. You don&#039;t have to include the full string, but a combination of a few of these may be of use:<BR> 1) The SQL identity seed for this user<BR> 2) Their email address<BR> 3) The current date<BR> 4) Level of access to website/application<BR><BR>You can convert any of these strings to their ASCII numerics if you want, or just take the first three and last four alphanumeric characters of their email address and something to do with the date.<BR><BR>E.g.<BR> email:<BR> date = 22/08/2001<BR> level of access = 0<BR> sql identity seed = 34<BR><BR>you could generate the password of YM2001DE08A22 quite easily. First two letters of email address-reversed, followed by the year, then by the identity seed as two letters (A=0,B=1,...3=D,4=E), followed by the month, followed by the access level using the same method as before, followed by the day.<BR><BR>Ok, it sounds long-winded, but you could accomplish this with only a few lines of code....<BR><BR>Craig.

Posting Permissions

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