fix block chaining

This commit is contained in:
2023-11-25 14:50:12 +01:00
parent 508078ed20
commit 9b41cd961b

View File

@@ -155,7 +155,12 @@ func Encrypt(c *Conf, filename string) error {
for i := 0; i < c.count; i++ {
for {
EncryptChunk(aead, outfile, size)
if size < chunkSize {
EncryptChunk(aead, outfile, size)
break
}
EncryptChunk(aead, outfile, chunkSize)
size = size - chunkSize
if size <= 0 {