natural commented on a change in pull request #3594: NIFI-3833 Support for 
Encrypted Flow File Repositories
URL: https://github.com/apache/nifi/pull/3594#discussion_r323573295
 
 

 ##########
 File path: 
nifi-commons/nifi-write-ahead-log/src/main/java/org/apache/nifi/wali/LengthDelimitedJournal.java
 ##########
 @@ -411,9 +417,10 @@ public JournalRecovery recoverRecords(final Map<Object, 
T> recordMap, final Set<
         final double journalLength = journalFile.length();
 
         try (final InputStream fis = new FileInputStream(journalFile);
-            final InputStream bufferedIn = new BufferedInputStream(fis);
-            final ByteCountingInputStream byteCountingIn = new 
ByteCountingInputStream(bufferedIn);
-            final DataInputStream in = new DataInputStream(byteCountingIn)) {
+             final InputStream bufferedIn = new BufferedInputStream(fis);
+             final InputStream plainIn = 
SimpleCipherInputStream.wrapWithKey(bufferedIn, cipherKey);
+             final ByteCountingInputStream byteCountingIn = new 
ByteCountingInputStream(plainIn);
 
 Review comment:
   Yeah, that's actually intentional at this point.  Moving the 
`ByteCountingInputStream` below the cipher stream caused lots of test failures.
   
   I can swing back and re-investigate later if you'd prefer.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to