Java has some nice encryption and digital signature classes.
Look in the java.security package
I suppose you could apply the MD5 message digest algorithm to the supplied password and store that. I was fiddling with this recently.
static
String md5sum(byte[] intext){
StringBuffer sb = new StringBuffer();
try {
// get Instance from Java Security Classes
MessageDigest md5 = MessageDigest.getInstance("MD5");
byte[] md5rslt = md5.digest( intext );
for( int i = 0 ; i < md5rslt.length ; i++ ){
sb.append(Integer.toHexString( (0xff & md5rslt[i])));
}
} catch(NoSuchAlgorithmException ex) {
System.err.println(ex);
return null ;
}
return sb.toString() ;
}
Bill