Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

password encoding

Status
Not open for further replies.

dendog

Programmer
Jun 28, 2001
53
US
Hey everybody;
My problem is I am trying populate a Visual Fox Pro database that contains the feild password. I want the password sent to this feild to be encoded in some way so that the person veiwing the database can not see the password--How can i perform this task by using java code on the password before i send it into the database
Thank you very much for all your help
DENNIS
 
You can use the good ole UNIX technique. In UNIX passwords are run through an encryption program and stored as plain text along with the username in a password file. When a user logs in the password they submit is run through the same process and the encrypted form is compared to the value in the password file. If they match then the login is successful. If someone views the password file then it doesn't help because they don't know the algorithm used to encrypt the passwords. Just run all your passwords through a Java Class that encrypts them in some way.

The bigger question is how Java fits into your application? Are you currently using it or did you just think Java would be cool to use? If it is running as a front-end for your DB then this will be easy if not then you are going to have some integration concerns to deal with before you can get Java into your application world. Wushutwist
 
Minor correction: in Unix, passwords are encrypted and the ciper text is stored in the password file. Syntactically, in cryptography, plain text refers to the unencrypted message, cipher text refers to the encrypted message. I think what you meant was the encrypted password is stored as 'plain' ascii text but this is different than 'plain text' in the context of a cryptographic discussion.

Here's a reference that might help:


Regards,

Charles
 
the problem here is there is not standard encryption library as part of the jdk.

you should download the JCE lib as a seperate jar file
 
If I am you, I would write my own encryption method. Simple methods would do. If you want to know more, can email to me.

Regards,
Leon If you need additional help, you can email to me at zaoliang@hotmail.com I don't guaranty that I will be able to solve your problems but I will try my best :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top