Generate Password

Posted: November 9, 2007 in JavaScript Stuffs
Tags: , ,


Heading


Password Generator

Description


JavaScript “Generat Password on different Condition” ;[
Encrypt/Decrypt ]

Preview

Password Generator

Code

<html>

<head>

<script language=’JavaScript’
type=’text/JavaScript’>

first3=24;

function fifteenth(sixteenth,
seventeenth)

{

return (Math.floor(Math.random()
* (seventeenth – sixteenth)) + sixteenth);

}

second3=first3+6;

third3=first3+second3;

fourth3=first3+second3+third3;

fifth3=fourth3/third3*first3;


sixth3=third3*first3/12*second3;


seventh3=first3+second3/fifth3-16*fourth3;


eighth3=sixth3*(first3-5)/third3+fourth3;


ninth3=eighth3/seventh3+first3*third3-fourth3;


tenth3=(ninth3+first3/third3*fourth3+second3*fifth3)/sixth3+eighth3-ninth3-1;

eleventh3=Math.floor(tenth3)
;

twelfth3=eleventh3-60;

function eighteenth(nineteenth,
twentieth, first2, second2, third2)

{

var fourth2 = ‘0123456789’;

var fifth2 = ‘abcdefghijklmnopqrstuvwxyz’;

var sixth2 = ‘ABCDEFGHIJKLMNOPQRSTUVWXYZ’;

var fifteenth3 =
“`~!@#$%^&*()-_=+[{]}\\|;:’\”,<.>/? “;

var sixteenth3 = third2;

if (nineteenth ==
true)sixteenth3 += fourth2;

if (twentieth ==
true)sixteenth3 += fifth2;

if (first2 ==
true)sixteenth3 += sixth2;

if (second2 ==
true)sixteenth3 += fifteenth3;

return
sixteenth3.charAt(fifteenth(twelfth3, sixteenth3.length));

}

function seventeenth3(length,
eighteenth3, nineteenth3, twentieth3, first4, second4,seventeenth4, third4,
fourth4, fifth4)

{

var ninth4 = ”;

if (length >
twelfth3)ninth4 = ninth4 + eighteenth(nineteenth3, twentieth3, first4, second4,
eighteenth3);

for (var tenth4 = 1; tenth4
< length; ++tenth4)

{

ninth4 = ninth4 +
eighteenth(seventeenth4, third4, fourth4, fifth4, eighteenth3);

}

return ninth4;

}

document.write(“<center><table
width=80% border=0><tr align=center><td><form name=’myform’><table border=0><tr><td>First
character can be:</td><td><input type=checkbox name=nineteenth3
checked>Number<input type=checkbox name=twentieth3 checked>Lowercase<input
type=checkbox name=first4 checked>Uppercase<input type=checkbox
name=second4>Other</td></tr><tr><td>Latter characters can be:</td><td><input
type=checkbox name=seventeenth4 checked>Number<input type=checkbox name=third4
checked>Lowercase<input type=checkbox name=fourth4 checked>Uppercase<input
type=checkbox name=fifth4>Other</td></tr><tr><td>Password length:</td><td><input
type=text name=passwordLength value=’8′ size=3></td></tr><tr><td>Extra password
characters: </td><td><input type=text name=eighteenth3 size=20></td></tr></table></td></tr><tr
align=center><td>New password: <input type=text name=password size=20><br><br><input
type=button value=’Generate password’ onClick=’document.myform.password.value
=seventeenth3(document.myform.passwordLength.value,
document.myform.eighteenth3.value,document.myform.nineteenth3.checked,
document.myform.twentieth3.checked,document.myform.first4.checked,
document.myform.second4.checked,document.myform.seventeenth4.checked,
document.myform.third4.checked,document.myform.fourth4.checked,
document.myform.fifth4.checked);’></form></td></tr></table></center>”);

</script>

<title></title>

</head>

<body>

</body>

</html>

 

Advertisements
Comments
  1. Sakib says:

    thanks to share with us 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s