fix preload alignment for custom buffer sizes

This commit is contained in:
ston1th 2022-04-07 16:13:08 +02:00
commit cb7f2dee54
6 changed files with 12 additions and 46 deletions

View file

@ -3,7 +3,6 @@ package crypto
import (
"crypto/cipher"
"errors"
"fmt"
"io"
"golang.org/x/crypto/chacha20poly1305"
@ -87,9 +86,7 @@ func (r *reader) readChunk() (last bool, err error) {
// The last chunk can be short.
in = in[:n]
last = true
fmt.Println("last nonce", r.nonce)
setLastChunkFlag(&r.nonce)
fmt.Println("last nonce flag", r.nonce)
case err != nil:
return false, err
}