mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-10 11:03:13 +00:00
12 lines
167 B
Go
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)))
|
||
|
}
|