Sometimes it's difficult to think of a unique password for every Web site
that requires one. And if you're a webmaster or system administrator, you
may need to create many unique passwords. In this article, you'll learn
what a good password is and how to generate random passwords with a few
simple lines of Java Script code.
A good password meets the following requirements:
1. It's long. The longer the better.
2. It can't be found in the dictionary.
4. It is not a proper noun (The name of a person, place, or thing).
5. It contains upper and lower case characters.
6. It contains alpha and numeric characters.
A password cracker is a program used by hackers that generates a continuous
sequence of passwords until it finds the one that works. Some hackers have
nothing better to do with their time than spend days, even years, running
a password cracker on specific websites.
A password cracker starts out by trying every word in the dictionary. If none
of them work, it will try every known proper name. Next, it will try every possible
arrangement of alpha characters. Then it will try every possible arrangement
of alpha and numeric characters.
So, if you have a long password that consists of random alpha and numeric
characters, a hacker is going to dedicate a long period of their life trying
to hack into your account.
- Note: One thing that makes the hackers life more difficult is security systems
that allow only a limited number of tries (sometimes as few as three) to enter
a valid password before the username is locked out. The lockout period may be
from five minutes to an hour or longer.
So, it's critical that you create a good password. Unfortunately, some websites
limit the number of characters that you can use in your password (some as
little as eight characters).
In this article, I'm going to provide you with two examples of Java Script
random password generators. The first one generates human friendly two syllable
pseudo-words. The second one generates any length secure random passwords.
The code for the first example is shown below.
When you click on the "Make Password" button, it executes the "randPassword()"
function. The "randPassword()" function uses the Java Script Math.random() and
Math.round() functions to create two random integers. The random integers are
used as indexes into the strChunk array. The array contains a list of four
character words.
Note: To get more security passwords you should add many more four character words
to the array.
You might think the passwords this example creates are not the most secure in
the world, and you would be right. However, even though the four character words
ARE in the dictionary, the concatenation of any two of them is not. If the resulting
eight-character password does turn out to be a dictionary word, just click on the
button to get another choice.