Make media encrypter stream ordered

Co-authored-by: Chris Eager <79161849+eager-signal@users.noreply.github.com>
This commit is contained in:
ravi-signalandChris Eager authored and GitHub committed 2024-04-04 10:53:45 -05:00
1 parent 3a1ecb342f
commit 498dcbbfe8
1 file changed
+1 -1
@@ -46,7 +46,7 @@ public class BackupMediaEncrypter {
return ByteBuffer.wrap(cipher.getIV());
}),
Flux.from(FlowAdapters.toPublisher(sourceBody))
.flatMap(buffers -> Flux.fromIterable(buffers))
.concatMap(Flux::fromIterable)
.concatMap(byteBuffer -> {
final byte[] copy = new byte[byteBuffer.remaining()];
byteBuffer.get(copy);