Last active
December 15, 2015 06:29
-
-
Save carchrae/5216610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.security.authentication.encoding.Md5PasswordEncoder; | |
public class CustomMd5PasswordEncoder extends Md5PasswordEncoder { | |
@Override | |
protected String mergePasswordAndSalt(String password, Object salt, | |
boolean strict) { | |
if (password == null) { | |
password = ""; | |
} | |
if (salt == null) { | |
return password; | |
} | |
return salt.toString() + password; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment