@Override
    public boolean matches(final CharSequence rawPassword, final String encodedPassword) {
        val encodedRawPassword = StringUtils.isNotBlank(rawPassword) ? encode(rawPassword.toString()) : null;
        val matched = StringUtils.equals(encodedRawPassword, encodedPassword);
        val msg = String.format("Provided password does%smatch the encoded password",
            BooleanUtils.toString(matched, StringUtils.EMPTY, " not "));
        LOGGER.debug(msg);
        return matched;
    }
This is {@link DefaultPasswordEncoder}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/crypto/DefaultPasswordEncoder.java