MD5 or SHA-256 would be fine, although MD5 is crackable now.
Maybe I misunderstood the problem, but it should be just comparing the hashed passwords.
In hibernate, just store as a String. On the validation side, have a method like:
public validate(String user, String pass)
{
if(getUser(user).getPass().equals(getHash(pass)))
return true;
return false;
}