8
Convert a password returned by JPasswordField::getPassword() into a String.
-5
Create a random password:
usage: CreatePasswd( 8,True,False)
usage: CreatePasswd( 8,True,False)
-4
Usage: cscript //nologo RandPass.vbs [password_length]|[?] [complexity] [uniqueness]
This script will generate a random password of X length. It will build the password from seed 'strings of increasing complexity.
1 - simple is the lower case alphabet, numbers 2-9 and !@#$%^&*() all randomly interspersed.
2 - complex is the same as the previous with the addition of UPPER case letters.
3 - insane is the same as the previous with the additional symbols of ,./?>;'[]}{\|~`:
The numbers 0 and 1 have been removed to avoid confusion with the letters O and L.
password_length should be a number between 4 and 127, although a limit of 14 is recommended for Win9x clients. Default is 7
complexity must be 1,2 or 3
uniqueness value of 0 will make each password character unique. A value of 1 [default] will allow repeated characters.
If you don't pass values at the command prompt, you will be prompted for each value.
This script will generate a random password of X length. It will build the password from seed 'strings of increasing complexity.
1 - simple is the lower case alphabet, numbers 2-9 and !@#$%^&*() all randomly interspersed.
2 - complex is the same as the previous with the addition of UPPER case letters.
3 - insane is the same as the previous with the additional symbols of ,./?>;'[]}{\|~`:
The numbers 0 and 1 have been removed to avoid confusion with the letters O and L.
password_length should be a number between 4 and 127, although a limit of 14 is recommended for Win9x clients. Default is 7
complexity must be 1,2 or 3
uniqueness value of 0 will make each password character unique. A value of 1 [default] will allow repeated characters.
If you don't pass values at the command prompt, you will be prompted for each value.
10
mattrmiller
This is a correct way to do login form auto-focus, checking to see if either username or password have focus already. This prevents someone from typing a username hitting TAB, then having JavaScript chime in, resetting focus to Username while user is typing in their password. In this case, the password is appended to the username which is in plaintext.
15
This litle snippet shows how to store passwords and then check inputed passwords if they are correct.
(In this snippet we use som pseduo code for the database connection).
(In this snippet we use som pseduo code for the database connection).
11
Creates a random string, usefull for passwords etc.
Use: $password = makeRandomPassword($Length);
If $Length is not specified (ie $password = makeRandomPassword();) then it will default to 8 characters
Use: $password = makeRandomPassword($Length);
If $Length is not specified (ie $password = makeRandomPassword();) then it will default to 8 characters
-12
This is a quick and easy method to generate a somewhat random password. This simply generates the MD5 hash for the integer returned by the time() function and then truncates it to the specific length.
19
inxilpro
This function creates relatively secure random passwords. It's by no means ideal, but it should work in most non-critical situations. The nice thing is the generator attempts to create passwords that people can pronounce and chooses letters that won't be mistaken for others (such as the numeral "1", an upper-case "i" and a lower-case "L"). To keep the code short much of this functionality is very rudimentary, but it's better than nothing.
8
Based on "Random Password Generation"
14
inxilpro
This is a random password generator that produces understandable passwords based on word lists. I've only included a 3 entry world list because you should chose a list based on your password requirements and your users. If you need to generate passwords that are 14 characters in length, you will want a different list than if you're generating 8 character passwords. And depending on your users, you may want to use certain lists. The list I use is about 4000 words that are 5-7 characters long, all well-known words that have had potentially objectionable content removed. For security reasons I don't want to include this list.
A note on security: though this generates relatively strong passwords for the average user, they are particularly susceptible to brute-force attacks. This is even more an issue if somehow your word list gets compromised. I would not recommend using this function for anything where a highly secure password is needed.
A note on choosing your list: You'll also see that I've built the system to avoid generating passwords with zeros and ones in them. This is because zero and upper-case "o" can be confused as can one, lower-case "L" and upper-case "i." When choosing my word list I was also sure to strip out all words that start with the letter "o" or "i" (to prevent the optional ucfirst() from creating 0/O and I/1 confusion) and words that contain the letter "L" (to prevent l/1 confusion). I find that this greatly helps with preventing confusion, but again weakens the security of the passwords some. It's your choice.
A note on security: though this generates relatively strong passwords for the average user, they are particularly susceptible to brute-force attacks. This is even more an issue if somehow your word list gets compromised. I would not recommend using this function for anything where a highly secure password is needed.
A note on choosing your list: You'll also see that I've built the system to avoid generating passwords with zeros and ones in them. This is because zero and upper-case "o" can be confused as can one, lower-case "L" and upper-case "i." When choosing my word list I was also sure to strip out all words that start with the letter "o" or "i" (to prevent the optional ucfirst() from creating 0/O and I/1 confusion) and words that contain the letter "L" (to prevent l/1 confusion). I find that this greatly helps with preventing confusion, but again weakens the security of the passwords some. It's your choice.









