xftp: write secret_box auth tag to the end of the file, for efficiency of ecryption/decryption (#650)

* xftp: write secret_box auth tag to the end of the file, for efficiency of ecryption/decryption

* comments
This commit is contained in:
Evgeny Poberezkin authored and GitHub committed 2023-02-23 18:28:20 +00:00
1 parent fbf0b8b175
commit 4ce4fa3423
9 files changed
+105 -32

No files matched your search

+1 -1
View File
@@ -120,7 +120,7 @@ sendXFTPCommand XFTPClient {http2Client = http2@HTTP2Client {sessionId}} pKey fI
forM_ chunkSpec_ $ \XFTPChunkSpec {filePath, chunkOffset, chunkSize} ->
withFile filePath ReadMode $ \h -> do
hSeek h AbsoluteSeek $ fromIntegral chunkOffset
sendFile h send chunkSize
sendFile h send $ fromIntegral chunkSize
done
createXFTPChunk ::