Fixed bug in downloading file
This commit is contained in:
parent
21792a6846
commit
af34bb9453
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue