Clash.Meta/transport/ssr/tools/bufPool.go
2021-09-20 21:02:18 +08:00

12 lines
167 B
Go

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