github.com/metacubex/mihomo@v1.18.5/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  }