Clash.Meta/transport/ssr/tools/bufPool.go

12 lines
167 B
Go
Raw Normal View History

package tools
import (
"bytes"
2021-09-20 21:02:18 +08:00
"crypto/rand"
"io"
)
func AppendRandBytes(b *bytes.Buffer, length int) {
2021-09-20 21:02:18 +08:00
b.ReadFrom(io.LimitReader(rand.Reader, int64(length)))
}