protected Encrypter buildEncrypterForSamlObject(final Object samlObject,
                                                    final SamlRegisteredService service,
                                                    final SamlRegisteredServiceMetadataAdaptor adaptor) {
        val entityId = adaptor.getEntityId();
        LOGGER.trace("Calculating encryption security configuration for [{}] based on service [{}]", entityId, service.getName());
        val encryptionConfiguration = configureEncryptionSecurityConfiguration(service);

        FunctionUtils.doUnchecked(__ -> {
            LOGGER.trace("Fetching key encryption credential for [{}] based on service [{}]", entityId, service.getName());
            configureKeyEncryptionCredential(entityId, adaptor, service, encryptionConfiguration);
        });

        LOGGER.trace("Fetching key encryption parameters for [{}] based on service [{}]", entityId, service.getName());
        val keyEncParams = getKeyEncryptionParameters(samlObject, service, adaptor, encryptionConfiguration);
        if (keyEncParams != null) {
            LOGGER.trace("Key encryption algorithm for [{}] is [{}]", keyEncParams.getRecipient(), keyEncParams.getAlgorithm());
        }

        LOGGER.trace("Fetching data encryption parameters for [{}] based on service [{}]", entityId, service.getName());
        val dataEncParams = getDataEncryptionParameters(samlObject, service, adaptor, encryptionConfiguration);
        if (dataEncParams != null) {
            LOGGER.trace("Data encryption algorithm for [{}] is [{}]", entityId, dataEncParams.getAlgorithm());
        }
        LOGGER.trace("Building encrypter component for [{}]", entityId);
        return getEncrypter(samlObject, service, adaptor, keyEncParams, dataEncParams);
    }
Decode name id.

@param encryptedId the encrypted id
@param service     the service
@param adaptor     the adaptor
@return the name id
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/SamlIdPObjectEncrypter.java