Limit memory usage, add several sync.Pool

This commit is contained in:
Alexander Neumann
2014-11-23 16:48:00 +01:00
parent 575635753e
commit f95788ed90
14 changed files with 277 additions and 97 deletions

View File

@@ -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)