mirror of
https://github.com/restic/restic.git
synced 2025-10-29 12:30:03 +00:00
Limit memory usage, add several sync.Pool
This commit is contained in:
@@ -48,10 +48,12 @@ func TestCrypto(t *testing.T) {
|
||||
Sign: tv.skey,
|
||||
}
|
||||
|
||||
msg, err := r.encrypt(r.master, tv.plaintext)
|
||||
msg := make([]byte, MaxCiphertextSize)
|
||||
n, err := r.encrypt(r.master, msg, tv.plaintext)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
msg = msg[:n]
|
||||
|
||||
// decrypt message
|
||||
_, err = r.decrypt(r.master, msg)
|
||||
|
||||
Reference in New Issue
Block a user