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!

paswword encryption

Status
Not open for further replies.

riches85

Programmer
Nov 13, 2002
59
US
I need to have a password encrypted and compared to a value found in a mysql table as part of a log on for my JSP application. I'm new to Encryption under java and I was wondering what is the best way of doing so. I have been looking online to no avail. Just a point in the right direction would be great. Thanks
 
Hi riches85:

It depends on your security needs. To place a password input in the html with a post form method should be enough for basic security. But still an amateur hacker could sniffer the passwords. I will search my files for a security application embedded with java, I can't remember the name right now.

The following code loads the libpassword.so library to work with passwords in Java:



public class Password
{

public Password()
{
}

public static native int GETAPPS(String s, String as[]);

public static native boolean changePassword(String s, String s1, String s2)
throws PasswordException;

public static native boolean checkPassword(String s, String s1)
throws PasswordException, DefaultPasswordException;

public static native boolean overridePassword(String s, String s1, String s2)
throws PasswordException;

static
{
System.loadLibrary("password");
}
}


As soon as I find the application name I will post it.

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top