Hello,
I'm loking at the code and it seems that the way JBCryptPasswordEncoder is used in the salt is reused for all passwords.
The salt is saved for the lifetime of the encoder.
public class JBCryptPasswordEncoder implements PasswordEncoder {
private String salt;
public JBCryptPasswordEncoder(final String salt) {
this.salt = salt;
}
Compared with the Spring implementation, where the salt is generated during the encoding phase.
public String encode(CharSequence rawPassword) {
byte[] salt = this.saltGenerator.generateKey();
byte[] hash = new byte[this.hashLength];
IMO, JBCryptPasswordEncoder is insecure and should be fixed / removed.
Regards,
Eugen