bean.setProperties(properties);
if (sign) {
bean.getOutInterceptors().add(new XmlSigOutInterceptor());
}
XmlEncOutInterceptor encInterceptor = new XmlEncOutInterceptor();
encInterceptor.setKeyIdentifierType(keyIdentifierType);
encInterceptor.setSymmetricEncAlgorithm(symmetricAlgorithm);
encInterceptor.setDigestAlgorithm(digestAlgorithm);
bean.getOutInterceptors().add(encInterceptor);
bean.getInInterceptors().add(new XmlEncInInterceptor());
if (sign) {
bean.getInInterceptors().add(new XmlSigInInterceptor());