more async improvements and crypto bugfix

This commit is contained in:
ston1th 2022-08-17 23:58:46 +02:00
commit 304135be2e
7 changed files with 161 additions and 79 deletions

View file

@ -97,7 +97,6 @@ func (r *reader) readChunk() (last bool, err error) {
return false, err
}
//outBuf := make([]byte, 0, ChunkSize)
out, err := r.a.Open(r.outBuf, r.nonce[:], in, nil)
if err != nil && !last {
// Check if this was a full-length final chunk.
@ -110,7 +109,6 @@ func (r *reader) readChunk() (last bool, err error) {
}
incNonce(&r.nonce)
//r.unread = r.buf[:copy(r.buf[:], out)]
size := FullSize
if len(out) < FullSize {
size = len(out)