title: Issue decrypting and zipping in Camel
body: <h2>Question</h2>
  
  <p>I have a camel route that reads 4 xml files and encrypts them using camel crypto. I have another route that picks up these encrypted files, decrypts and saves them to file system. It works absolutely fine. </p>
  
  <p>However, I have a requirement to decrypt and zip these files in a single camel route. I haven't been able to do that. Any help would be greatly appreciated.</p>
  
  <h2>Exception</h2>
  
  <pre><code>Caused by: java.io.IOException: Attempted to read a '1347093252' byte initialization vector from inputStream but only '6016' bytes were retrieved
                  at org.apache.camel.converter.crypto.CryptoDataFormat.getInlinedInitializationVector(CryptoDataFormat.java:193)
  
  WARN  AggregateProcessor             - Error processing aggregated exchange. Exchange[Message: [Body is file based: /tmp/camel-tmp-342373/camel4393278949787760082.zip]]. Caused by: [java.io.IOException - Error reading initialization vector from encrypted stream]
  java.io.IOException: Error reading initialization vector from encrypted stream
                  at org.apache.camel.converter.crypto.CryptoDataFormat.getInlinedInitializationVector(CryptoDataFormat.java:197)
                  at org.apache.camel.converter.crypto.CryptoDataFormat.unmarshal(CryptoDataFormat.java:152)
                  at org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:65)
                  at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
                  at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
                  at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
                  at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
  </code></pre>
  
  <h2>Route</h2>
  
  <pre><code>&lt;camel:crypto id="cry" keyRef="secretKey" algorithm="AES/CBC/PKCS5Padding" initVectorRef="iv" inline="true" 
        shouldAppendHMAC="false" /&gt;
  
  &lt;camel:route&gt;
         &lt;camel:from uri="file:/opt/vipin/abc/dec?include=.*.xml&amp;amp;noop=true" /&gt;
               &lt;camel:marshal ref="cry" /&gt;
               &lt;camel:to uri="file:/opt/vipin/abc/enc?doneFileName=test.done" /&gt;
  &lt;/camel:route&gt;
  
  &lt;camel:route&gt;
       &lt;camel:from uri="file:/opt/vipin/abc/enc?  
            include=.*.xml&amp;amp;noop=true&amp;amp;doneFileName=test.done" /&gt;
       &lt;camel:aggregate strategyRef="zipAggregationStrategy"    
          completionFromBatchConsumer="true" completionSize="4"&gt;
        &lt;camel:correlationExpression&gt;
         &lt;camel:constant&gt;true&lt;/camel:constant&gt;
       &lt;/camel:correlationExpression&gt;
      &lt;camel:convertBodyTo type="java.io.File" /&gt;
      &lt;camel:unmarshal ref="cry" /&gt;
      &lt;camel:to uri="file:/opt/vipin/abc/dec?fileName=abc.zip" /&gt;
   &lt;/camel:aggregate&gt;
  &lt;/camel:route&gt;
  </code></pre>