final String digestedPassword) {
boolean authenticated = super.authenticate(password, cipherAlgorithm, digestedPassword);
// if "normal" authentication fails and cipher is SMD5, we're probably handling an "old" MD5 password
if (!authenticated && CipherAlgorithm.SMD5 == cipherAlgorithm) {
StandardStringDigester digester = new StandardStringDigester();
digester.setAlgorithm("MD5");
digester.setIterations(1);
digester.setSaltSizeBytes(0);
digester.setStringOutputType(CommonUtils.STRING_OUTPUT_TYPE_HEXADECIMAL);
authenticated = digester.matches(password, digestedPassword);
}
return authenticated;
}