sing-box/transport/clashssr/tools/bufPool.go

12 lines
167 B
Go
Raw Normal View History

package tools
import (
"bytes"
"crypto/rand"
"io"
)
func AppendRandBytes(b *bytes.Buffer, length int) {
b.ReadFrom(io.LimitReader(rand.Reader, int64(length)))
}