protected DataEncryptionParameters getDataEncryptionParameters(
        final Object samlObject,
        final SamlRegisteredService service,
        final SamlRegisteredServiceMetadataAdaptor adaptor,
        final BasicEncryptionConfiguration encryptionConfiguration) {

        return FunctionUtils.doAndHandle(() -> {
            val params = resolveEncryptionParameters(service, encryptionConfiguration);
            return Optional.of(params)
                .map(param -> new DataEncryptionParameters(params))
                .orElseGet(() -> {
                    LOGGER.debug("No data encryption parameters could be determined");
                    return null;
                });
        }, e -> {
            throw new SamlException(e.getMessage(), e);
        }).get();
    }
Gets data encryption parameters.

@param samlObject              the saml object
@param service                 the service
@param adaptor                 the adaptor
@param encryptionConfiguration the encryption configuration
@return the data encryption parameters
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/SamlIdPObjectEncrypter.java