if (xmlSecStartElement.getName().equals(XMLSecurityConstants.TAG_dsig_Signature)) {
signatureElementFound = true;
startIndexForProcessor = eventCount - 1;
} else if (xmlSecStartElement.getName().equals(XMLSecurityConstants.TAG_xenc_EncryptedData)) {
XMLDecryptInputProcessor inputProcessor = new XMLDecryptInputProcessor(getSecurityProperties());
subInputProcessorChain.addProcessor(inputProcessor);
subInputProcessorChain.removeProcessor(internalBufferProcessor);
InternalReplayProcessor internalReplayProcessor = new InternalReplayProcessor(getSecurityProperties());
internalReplayProcessor.setPhase(XMLSecurityConstants.Phase.PROCESSING);
internalReplayProcessor.getAfterProcessors().clear();