public String encryptValue(final String value, final Function<Exception, String> handler) {
        try {
            return encryptValueAndThrow(value);
        } catch (final Exception e) {
            return handler.apply(e);
        }
    }
Encrypt value string.

@param value   the value
@param handler the handler
@return the string
core/cas-server-core-configuration-api/src/main/java/org/apereo/cas/configuration/support/CasConfigurationJasyptCipherExecutor.java