web blazonry web development scripts and tutorials Get best price on Samsung Galaxy Note 4, Charcoal Black 32GB (Verizon Wireless)
   PHP       Name Generators       Perl       CSS       Javascript       Java       MySql       How Tos       Resources   

Javascript Home


image scripts
  Image Load Order
  Mouse Overs
  SlideShow

JavaScript Resources
  Free JavaScript Books(new)
  Recommended Sites
  Bestselling Books

Bookmark and Share




JavaScript: Password Generator

This is a handy little script that generates a password. It lets you set the number of characters you want for your password and whether punctuation is OK.

This is one of my personal favorite scripts because it is important to have a reasonably secure password. For more information, read my article about why it is important, and how to have a secure password.

Generated Password:

# of chars

No Punctuation Marks
Random Length (6 - 12)

 
 



Why is it important to have a strong password?

A strong password is a key way to prevent someone breaking in to your account or stealing your identity.

A strong password is one that is not easily guessed. It should have a combination of letters (both upper case and lower case), numbers and extended characters such as ! # ( ]. It should not be a word that is in the dictionary.

Some sites will give you a score that indicates how secure your password is. Don't rely on these. Here's why: next time you see one of them, enter in your street address as your password (no spaces between numbers & words). You'll likely get a score that your password is incredibly strong. Yet, someone who wants to break into your account could try it. Using an address as a password is a known pattern.

Notable Tidbits

This script works only in 4.0+ browsers. I cannot find a function in older JavaScript that can convert CHAR numbers to strings. Fortunately, this does not matter much anymore, but might impact people who love to run obscure browsers running on odd devices.

Here are a few of the key functions used in the code :

How I get my random number:

    // between 0 - 1
    var rndNum = Math.random()

    // rndNum from 0 - 1000
    rndNum = parseInt(rndNum * 1000);

    // rndNum from 33 - 127
    rndNum = (rndNum % 94) + 33;

How I convert random number to string:

    textChar = String.fromCharCode(rndNum);

Get the password generator source code.

 

Newest Pages
Test Google Ads Ver. 2
Free Linux Admin Books
Free Linux Books for Programmers
Free Books for Linux on the Desktop
Free PHP Books
Free JavaScript Books
Free Java Books - Advanced
Free Java Books - Basic
Free Perl Books
Free Python Books
Quote of the Day (PHP)
Debugging Part 2
How to Test Google Ads
Most Popular Pages
Baby Name Generator
U.S. Name Generator
Wu Name Generator
Popup Windows (JavaScript)
Upload and Resize an Image (PHP)
How To Install Apache + PHP + MySQL
Intro to Web Databases (PHP, MySQL)

Least Popular Pages
iNews Applet (Java)
Java Resources
Site Monitor (Perl)
PHP Resources
 
 

  privacy policy     ||     © 1997-2016. astonishinc.com   All Rights Reserved.