mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 21:24:01 +03:00
Reuse buffers for stream cipher
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package wrappers
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var streamCipherBufferPool sync.Pool
|
||||
|
||||
func init() {
|
||||
streamCipherBufferPool = sync.Pool{
|
||||
New: func() interface{} {
|
||||
return &bytes.Buffer{}
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user