Using simple encryption through Javascript you can encrypt the password
using a key value prior to sending. (This offers very limited protection.)
However, using the same scheme with perl offers a little more. The below
Javascript and form provides a simple example. (Thanks to Gordon McComb -
The JavaScript Sourcebook)

<script language="javascript">
<!--
function getForm()
{
 // Place User Entry into Variables

 name = document.passform.username.value;
 pswd = encode(document.passform.password.value,12);

}

function encode(OrigString, CipherVal)
{
 Ref="0123456789abcdefghijklmnopqrstuvwxyz.*-~ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 CipherVal = parseInt(CipherVal)
 var Temp=""
 for (Count=0; Count < OrigString.length; Count++){
  var TempChar = OrigString.substring(Count, Count+1)
  var Conv = cton(TempChar)
  var Cipher=Conv^CipherVal
  Cipher=ntoc(Cipher)
  Temp += Cipher
 }
 return(Temp)
}

function cton(Char)
{
 return(Ref.indexOf(Char));
}

function ntoc(Val)
{
 return(Ref.substring(Val, Val+1))
}
//-->
</script>

<form method="POST" name="passform">
  <div align="center"><center><table border="1" cellpadding="0"
cellspacing="0" bordercolordark="#000080" bordercolorlight="#008080">
    <tr>
      <td bgcolor="#008080"><font color="#00FFFF"><strong>Your
Name:</strong></font></td>
      <td><input type="text" size="30" name="username"></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#008080"><font
color="#00FFFF"><strong>Password:</strong></font></td>
      <td><input type="password" size="30" name="password"></td>
    </tr>
    <tr>
      <td align="center" colspan="2"><input type="button" name="B1"
value="Send" onclick="getForm()"><input type="reset" name="B2"
value="Clear"></td>
    </tr>
  </table>
  </center></div>
</form>

Rythmist


-----Original Message-----
Date: Thursday, August 06, 1998 10:59 AM
Subject: WC:>: encrypting password


>In order for someone to access our database via the web, they will have to
>enter a password.  What do I have to do to ensure that the pasword gets
>passed in an encrypted fashion and not as clear text?  Must I install SSL
>software on my web server?  Is there any other way to do it?  Does anyone
>have any experience with this.
>Thanks for any information.
>
>Malki Cymbalista


____________________________________________________________________
--------------------------------------------------------------------
 Join The Web Consultants Association :  Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------

Reply via email to