core/cas-server-core-configuration/src/main/java/org/apereo/cas/configuration/support/Beans.java
/**
     * New password encoder password encoder.
     *
     * @param properties the properties
     * @return the password encoder
     */
New password encoder password encoder.
@param properties the properties
@return the password encoder
New password encoder password encoder . @param properties the properties @return the password encoder
public static PasswordEncoder newPasswordEncoder(final PasswordEncoderProperties properties) {
        switch (properties.getType()) {
            case NONE:
                return NoOpPasswordEncoder.getInstance();
            case DEFAULT:
                return new DefaultPasswordEncoder(properties.getEncodingAlgorithm(), properties.getCharacterEncoding());
            case STANDARD:
                return new StandardPasswordEncoder(properties.getSecret());
            default:
                return new BCryptPasswordEncoder(properties.getStrength(),
                        new SecureRandom(properties.getSecret().getBytes(StandardCharsets.UTF_8)));
        }
    }
public static PasswordEncoder newPasswordEncoder ( final PasswordEncoderProperties properties ) { switch ( properties . getType ( ) ) { case NONE : return NoOpPasswordEncoder . getInstance ( ) ; case DEFAULT : return new DefaultPasswordEncoder ( properties . getEncodingAlgorithm ( ) , properties . getCharacterEncoding ( ) ) ; case STANDARD : return new StandardPasswordEncoder ( properties . getSecret ( ) ) ; default : return new BCryptPasswordEncoder ( properties . getStrength ( ) , new SecureRandom ( properties . getSecret ( ) . getBytes ( StandardCharsets . UTF_8 ) ) ) ; } }
New password encoder password encoder.
New password encoder password encoder .