Fixed bug in downloading file

This commit is contained in:
Neeraj Gupta 2023-10-21 12:55:30 +05:30
parent 21792a6846
commit af34bb9453

View file

@ -173,7 +173,7 @@ func DecryptFile(encryptedFilePath string, decryptedFilePath string, key, nonce
return err return err
} }
buf := make([]byte, decryptionBufferSize) buf := make([]byte, decryptionBufferSize+XChaCha20Poly1305IetfABYTES)
for { for {
readCount, err := reader.Read(buf) readCount, err := reader.Read(buf)
if err != nil && err != io.EOF { if err != nil && err != io.EOF {