To see each example:- Click on a link below and load the example in this window. Then to view the source code:- Click the right mouse button over the window and then select "View Source" from the pop-up window. If any graphics are used in the script:- Click the right mouse button over each graphic and then select "Save Picture As" from the pop-up menu. (All of the graphics are included in the same directory as the javascript example.) To go back to the Index:- Click on the "Back" button at the top of your browser.
Ascii Encryption | (Internet Explorer Only) A very simple encryption method that uses random values for each character. Interestingly, you can encrypt the same string as many times as you want and the result will always be different. Best used with short strings.
Character Encoder | Encrypts a string by converting each character to it's ASCII key code. Supports two-way encryption - from a string to the numeric code, or from the numeric code back to the string. You can, for example, send the encrypted code to a friend and have them decode it with this script.
Login Coder | This is undoubtedly the best password protection JavaScript you'll ever find. Besides supporting multiple users, multiple passwords, and even multiple destination pages (after they successfully login), this script is presented in a very easy-to-use interface that you're sure to love!
Multiple Users | Rather not have one password for access the Members-Only section of your site? Well, along comes this little JavaScript gem. You can set up a separate username and password for as many members as you want, and even give each a different page to go to after logging in!
Multiple Users Prompt | This JavaScript is just like the previous Multiple Users one, but doesn't use a table interface to login. Instead, after clicking the Login! button, the script will ask them for their username and password, and then perform the password-protection.
Password Generator | Generate a random password with the ability to include special characters and password restrictions.
Text Encryption | This JavaScript library provides encryption using simple, text-oriented method called column transposition. The idea is to write the plain text in block on the row-first bases. The text is then read column-first. The trick is in that the columns are not read from left to right, but in the order specified by the encryption key. Transliteration is also used.
Three Tries | If you want to "protect" a site and don't have CGI access, you can try this JavaScript. Visitors get three tries to enter the correct password then they are refused entry. Note: The password is: password
Virgenere Encryption | A fine example of the classic virgenere script and is nearly impossible to decode, even when using frequency analysis. This script is also entertaining since you can actually see the encryption taking place.
Xor Encryption | Performs a bitwise XOR (Exclusive Or) on each byte of the data you wish to encrypt using the key you provide. Useful as an additional security precaution when sending sensitive information over the Internet. (However, this method is not foolproof and should not be your only form of security.) The author notes that longer and more random keys increase the strength of the encryption.