github.com/kelleygo/clashcore@v1.0.2/transport/ssr/tools/bufPool.go (about)

     1  package tools
     2  
     3  import (
     4  	"bytes"
     5  	"crypto/rand"
     6  	"io"
     7  )
     8  
     9  func AppendRandBytes(b *bytes.Buffer, length int) {
    10  	b.ReadFrom(io.LimitReader(rand.Reader, int64(length)))
    11  }