quote:
Originally posted by shirazcupala
The problem is that in InfoPath anything typed in the field is just stored as plaintext in the XML document. So anyone could see the data. You could use digital signatures which would be the most secure and reliable method.
In response to this, it is possible to implement a hashing algorithm so that you can store the password in the form as plaintext but still not be giving any information away. I've done this before with JScript and here's a quick overview of the process:
1. Downlaod the JavaScript source code for the SHA-1 hasing alogrithm here
http://pajhome.org.uk/crypt/md5/index.html.2. From that same website type the password and convert it to whatever algorithm you're using. (It will be a long alphanumeric string).
3. Store this alphanumeric string as a default value for one of the nodes in your form, or preferably in a 2DS.
4. Create a password field that whenever the 'Login' button is pressed it reads the typed password, runs it through the hashing alogorithm, and compares it to the value stored in the node in the 2DS. If they match, password is correct. Either way, erase the password from the input field so that plaintext is not stored with the form.
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge