Switch to rand/v2

This commit is contained in:
9seconds
2026-02-18 10:34:31 +01:00
parent 3b03c4a90a
commit a0aabf2391
7 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ package faketls
import (
"bytes"
"fmt"
"math/rand"
"math/rand/v2"
"github.com/9seconds/mtg/v2/essentials"
"github.com/9seconds/mtg/v2/mtglib/internal/faketls/record"
@@ -53,7 +53,7 @@ func (c *Conn) Write(p []byte) (int, error) {
lenP := len(p)
for len(p) > 0 {
chunkSize := rand.Intn(record.TLSMaxRecordSize)
chunkSize := rand.IntN(record.TLSMaxRecordSize)
if chunkSize > len(p) || chunkSize == 0 {
chunkSize = len(p)
}