StringUtils.java in the source contains a method for hashing a string using MD5. I successfully enabled support for MD5 passwords by modifying the source as follows:
// open DefaultAuthProvider.java
// find
import org.jivesoftware.util.Log;
// after add
import org.jivesoftware.util.StringUtils;
// find
catch (StringprepException se) {
throw new UnauthorizedException("Illegal username: " + se.getMessage());
}
// after add
password = StringUtils.hash(password);
// find
public boolean isDigestSupported() {
return true;
}
// replace with
public boolean isDigestSupported() {
return false;
}
// open DefaultUserProvider.java
// find
catch (UserNotFoundException unfe) {
// The user doesn’'t already exist so we can create a new user
// after add
password = StringUtils.hash(password);
// find
public void setPassword(String username, String password) throws UserNotFoundException
{
// after add
password = StringUtils.hash(password);
I changed the class names to MD5AuthProvider and MD5UserProvider, compiled the source with Ant, added the new class files to messenger.jar, modified jive-messenger.xml, and it works perfectly.
p.s. This was the first time I ever used Ant to compile something. Lemme just say that I am impressed. Everything compiled in 39 seconds with absolutely no errors. I am going to start using Ant to compile packaged source, which has been a nightmare in the past.