mirror of https://github.com/v2ray/v2ray-core
parent
9ec238d161
commit
24b300d75d
@ -1,17 +0,0 @@
|
||||
package fuzzing
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/rand"
|
||||
"io"
|
||||
)
|
||||
|
||||
func RandomBytes() []byte {
|
||||
buffer := make([]byte, 256)
|
||||
rand.Read(buffer)
|
||||
return buffer[1 : 1+int(buffer[0])]
|
||||
}
|
||||
|
||||
func RandomReader() io.Reader {
|
||||
return bytes.NewReader(RandomBytes())
|
||||
}
|
Loading…
Reference in new issue