- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 101 for rand1 (0.05 sec)
-
src/math/rand/v2/rand.go
} // New returns a new Rand that uses random values from src // to generate other random values. func New(src Source) *Rand { return &Rand{src: src} } // Int64 returns a non-negative pseudo-random 63-bit integer as an int64. func (r *Rand) Int64() int64 { return int64(r.src.Uint64() &^ (1 << 63)) } // Uint32 returns a pseudo-random 32-bit value as a uint32. func (r *Rand) Uint32() uint32 { return uint32(r.src.Uint64() >> 32) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 02:25:49 UTC 2024 - 12.8K bytes - Viewed (0) -
src/math/rand/rand.go
readPos int8 } // New returns a new [Rand] that uses random values from src // to generate other random values. func New(src Source) *Rand { s64, _ := src.(Source64) return &Rand{src: src, s64: s64} } // Seed uses the provided seed value to initialize the generator to a deterministic state. // Seed should not be called concurrently with any other [Rand] method. func (r *Rand) Seed(seed int64) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:09:08 UTC 2024 - 16.9K bytes - Viewed (0) -
src/crypto/tls/handshake_messages_test.go
panic("rand.Read failed: " + err.Error()) } return r } func randomString(n int, rand *rand.Rand) string { b := randomBytes(n, rand) return string(b) } func (*clientHelloMsg) Generate(rand *rand.Rand, size int) reflect.Value { m := &clientHelloMsg{} m.vers = uint16(rand.Intn(65536)) m.random = randomBytes(32, rand) m.sessionId = randomBytes(rand.Intn(32), rand)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 15.7K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/apis/meta/fuzzer/fuzzer.go
partLen := c.Rand.Intn(64) // len is [0, 63] if !canBeEmpty { partLen = c.Rand.Intn(63) + 1 // len is [1, 63] } runes := make([]rune, partLen) if partLen == 0 { return string(runes) } runes[0] = validStartEnd[c.Rand.Intn(len(validStartEnd))].choose(c.Rand) for i := range runes[1:] { runes[i+1] = validMiddle[c.Rand.Intn(len(validMiddle))].choose(c.Rand) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 03 15:12:26 UTC 2024 - 9.9K bytes - Viewed (0) -
src/crypto/ecdsa/ecdsa.go
return generateNISTEC(p224(), rand) case elliptic.P256().Params(): return generateNISTEC(p256(), rand) case elliptic.P384().Params(): return generateNISTEC(p384(), rand) case elliptic.P521().Params(): return generateNISTEC(p521(), rand) default: return generateLegacy(c, rand) } } func generateNISTEC[Point nistPoint[Point]](c *nistCurve[Point], rand io.Reader) (*PrivateKey, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 20.4K bytes - Viewed (0) -
src/runtime/hash_test.go
import ( "encoding/binary" "fmt" "internal/race" "internal/testenv" "math" "math/rand" "os" . "runtime" "slices" "strings" "testing" "unsafe" ) func TestMemHash32Equality(t *testing.T) { if *UseAeshash { t.Skip("skipping since AES hash implementation is used") } var b [4]byte r := rand.New(rand.NewSource(1234)) seed := uintptr(r.Uint64()) for i := 0; i < 100; i++ { randBytes(r, b[:])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 06 17:50:18 UTC 2024 - 18.4K bytes - Viewed (0) -
internal/grid/benchmark_test.go
return &testResponse{ OrgNum: req.Num, OrgString: req.String, Embedded: *req, }, nil })) errFatal(err) } const payloadSize = 512 rng := rand.New(rand.NewSource(time.Now().UnixNano())) payload := make([]byte, payloadSize) _, err = rng.Read(payload) errFatal(err) // Wait for all to connect // Parallel writes per server. b.Run("bytes", func(b *testing.B) {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
src/hash/maphash/smhasher_test.go
var fixedSeed = MakeSeed() // Sanity checks. // hash should not depend on values outside key. // hash should not depend on alignment. func TestSmhasherSanity(t *testing.T) { t.Parallel() r := rand.New(rand.NewSource(1234)) const REP = 10 const KEYMAX = 128 const PAD = 16 const OFFMAX = 16 for k := 0; k < REP; k++ { for n := 0; n < KEYMAX; n++ { for i := 0; i < OFFMAX; i++ {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:41:38 UTC 2024 - 11K bytes - Viewed (0) -
src/crypto/ed25519/ed25519.go
// GenerateKey generates a public/private key pair using entropy from rand. // If rand is nil, [crypto/rand.Reader] will be used. // // The output of this function is deterministic, and equivalent to reading // [SeedSize] bytes from rand, and passing them to [NewKeyFromSeed]. func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) { if rand == nil { rand = cryptorand.Reader } seed := make([]byte, SeedSize)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 11.7K bytes - Viewed (0) -
src/crypto/rsa/rsa.go
// uses should use the Sign* functions in this package directly. func (priv *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) { if pssOpts, ok := opts.(*PSSOptions); ok { return SignPSS(rand, priv, pssOpts.Hash, digest, pssOpts) } return SignPKCS1v15(rand, priv, opts.HashFunc(), digest) } // Decrypt decrypts ciphertext with priv. If opts is nil or of type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:11:18 UTC 2024 - 23.4K bytes - Viewed (0)