Dynamic Drive DHTML code library!
Dynamicdrive.com


.
spacer.gif (807 bytes)
Featured Script
Bottom slide tooltip 
Add a slide-in tooltip to your page's links with this cool script.
.
Site Info
Search DD
Recommend DD
Email offers
Code Services
DHTML Books
Advertising
Contact
.
Site Partners
Free JavaScripts
Free Graphics
.
Link to DD
Do you use scripts from Dynamic Drive? Please give something back by linking to us...
.
spacer.gif (807 bytes)

Home Small4.gif (1046 bytes) User and System Preference Small4.gif (1046 bytes) Here

Encrypted Password script All

Credits
Name:
Rob Heslop
Homepage: homepage
Last updated: July 23rd 2001 by Mike to include username field

Description: JavaScript password scripts have improved substantially over time, with the latest enhancement being an encrypted password, archived using "fuzzy" algorithms. The result are password scripts that won't crumble as soon as the user views the page's source. Use this script to password protect your webpage; based on a simple yet effective encryption method, it's one of the best of its kind.

Important: In general JavaScript password scripts are significantly less secure that their CGI counterpart. If your server supports CGI, the ideal method of password protection is via that route.

Demo: Username is "john" & password is "good":

Enter username:
Enter password:

Directions:

Step 1: First, generate the encrypted username/password set by typing the desired selections in the box below (ie: "john" and "good") and press calculate (the generator is NOT case sensitive):

Choose a UserName:
Choose a Password:
 

Encrypted Usercode:  
Encrypted Passcode:

Step 2: Once you have the encrypted set, name the secure page what your password is .htm (i.e. "good.htm"). Then, add the following script to the page leading up to the protected one, replacing the numbers inside the script (where indicated by the comments) with the numbers generated above:


You're done.

Let's replay everything, just to make sure everyone's on the same page:

Step 1: Use the generator to create the encrpted, numeric versions of your username/password (ie: "good" becomes 126906300)
Step 2: Name the page you wish to password protect what your password is, prefixed with .htm (ie: "good.htm")
Step 3: Inside the code of Step 2 above, change the two numbers to the numbers generated by the generator
Step 4: Finally, insert the code of Step 2 into the proceeding page visitors will login using.

Free free to rewind at this point...

Recommend Us!
-If you like Dynamic Drive, please recommend us to a friend...

Partner
Merchant Select
The #1 E-Commerce directory. Visit Merchant Select to find the perfect solution for your online business needs!

Legend
All- Script works with Netscape 4 AND Internet Explorer 4+
NS- Indicates script works with Netscape 4 (NOT NS 6 yet)
IE- Indicates script works with Internet Explorer 4 and above
IE5- Indicates script works with Internet Explorer 5 and above
NS6!- Temporary index set up on script category pages to indicate script works in NS6


Copyright © 1998-2003 Dynamic Drive. Please read Terms Of Use here before using any of the scripts.