From 620e681bb4065136126da4fd30d4fe22a544faf8 Mon Sep 17 00:00:00 2001 From: MalinAhlberg Date: Tue, 13 Feb 2024 16:59:49 +0100 Subject: [PATCH] set correct data block size --- api/sda/sda.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/sda/sda.go b/api/sda/sda.go index acbd645..8cb4692 100644 --- a/api/sda/sda.go +++ b/api/sda/sda.go @@ -349,7 +349,7 @@ var calculateEncryptedEndPosition = func(start, end int64, fileDetails *database headlength := bytes.NewReader(fileDetails.Header) bodyEnd := int64(fileDetails.ArchiveSize) if end > 0 { - var packageSize float64 = 64000 + var packageSize float64 = 65564 // 64KiB+28 but TODO 28 is for chacha20_ietf_poly1305 togo := end - start log.Debug("headlength size: ", headlength.Size()) bodysize := math.Max(float64(togo-headlength.Size()), 0)