- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 580 for rend (0.04 sec)
-
src/crypto/internal/edwards25519/scalar_test.go
// weighted towards high, low, and edge values. func (Scalar) Generate(rand *mathrand.Rand, size int) reflect.Value { var s [32]byte diceRoll := rand.Intn(100) switch { case diceRoll == 0: case diceRoll == 1: s = scOneBytes case diceRoll == 2: s = scalarMinusOneBytes case diceRoll < 5: // Generate a low scalar in [0, 2^125). rand.Read(s[:16]) s[15] &= (1 << 5) - 1 case diceRoll < 10:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:26:17 UTC 2023 - 7.6K bytes - Viewed (0) -
src/crypto/rand/rand_test.go
t.Fatalf("Compressed %d -> %d", len(b), z.Len()) } } func TestReadEmpty(t *testing.T) { n, err := Reader.Read(make([]byte, 0)) if n != 0 || err != nil { t.Fatalf("Read(make([]byte, 0)) = %d, %v", n, err) } n, err = Reader.Read(nil) if n != 0 || err != nil { t.Fatalf("Read(nil) = %d, %v", n, err) } } func BenchmarkRead(b *testing.B) { b.Run("32", func(b *testing.B) { benchmarkRead(b, 32)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 20:02:21 UTC 2024 - 1.2K bytes - Viewed (0) -
src/internal/trace/mud_test.go
package trace import ( "math" "math/rand" "testing" ) func TestMUD(t *testing.T) { // Insert random uniforms and check histogram mass and // cumulative sum approximations. rnd := rand.New(rand.NewSource(42)) mass := 0.0 var mud mud for i := 0; i < 100; i++ { area, l, r := rnd.Float64(), rnd.Float64(), rnd.Float64() if rnd.Intn(10) == 0 { r = l } t.Log(l, r, area)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.5K bytes - Viewed (0) -
test/stress/runstress.go
if *v { log.Println(a...) } } func dialStress(a net.Addr) { for { d := net.Dialer{Timeout: time.Duration(rand.Intn(1e9))} c, err := d.Dial("tcp", a.String()) if err == nil { Println("did dial") go func() { time.Sleep(time.Duration(rand.Intn(500)) * time.Millisecond) c.Close() Println("closed dial") }() } // Don't run out of ephemeral ports too quickly:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:21:35 UTC 2024 - 3.6K bytes - Viewed (0) -
src/math/rand/v2/race_test.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package rand_test import ( . "math/rand/v2" "sync" "testing" ) // TestConcurrent exercises the rand API concurrently, triggering situations // where the race detector is likely to detect issues. func TestConcurrent(t *testing.T) { const ( numRoutines = 10 numCycles = 10 )
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 30 14:31:46 UTC 2023 - 1005 bytes - Viewed (0) -
src/crypto/rsa/pss_test.go
// k otherwise, where k is the length in octets of the RSA modulus n." key, err := GenerateKey(rand.Reader, 513) if err != nil { t.Fatal(err) } digest := sha256.Sum256([]byte("message")) signature, err := key.Sign(rand.Reader, digest[:], &PSSOptions{ SaltLength: PSSSaltLengthAuto, Hash: crypto.SHA256, }) if err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 18:42:28 UTC 2024 - 8.8K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/universe.go
// license that can be found in the LICENSE file. package typecheck import ( "go/constant" "cmd/compile/internal/ir" "cmd/compile/internal/types" "cmd/internal/src" ) var ( okfor [ir.OEND][]bool ) var ( okforeq [types.NTYPE]bool okforadd [types.NTYPE]bool okforand [types.NTYPE]bool okfornone [types.NTYPE]bool okforbool [types.NTYPE]bool okforcap [types.NTYPE]bool
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 4.7K bytes - Viewed (0) -
security/pkg/pki/util/generate_csr.go
} priv, err = rsa.GenerateKey(rand.Reader, options.RSAKeySize) if err != nil { return nil, nil, fmt.Errorf("RSA key generation failed (%v)", err) } } template, err := GenCSRTemplate(options) if err != nil { return nil, nil, fmt.Errorf("CSR template creation failed (%v)", err) } csrBytes, err := x509.CreateCertificateRequest(rand.Reader, template, crypto.PrivateKey(priv)) if err != nil {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Mon Nov 06 12:48:53 UTC 2023 - 4.1K bytes - Viewed (0) -
src/slices/iter_test.go
// Copyright 2024 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package slices_test import ( "iter" "math/rand/v2" . "slices" "testing" ) func TestAll(t *testing.T) { for size := 0; size < 10; size++ { var s []int for i := range size { s = append(s, i) } ei, ev := 0, 0 cnt := 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 10 17:28:50 UTC 2024 - 5.7K bytes - Viewed (0) -
src/runtime/internal/wasitest/tcpecho_test.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package wasi_test import ( "bytes" "fmt" "math/rand" "net" "os" "os/exec" "testing" "time" ) func TestTCPEcho(t *testing.T) { if target != "wasip1/wasm" { t.Skip() } // We're unable to use port 0 here (let the OS choose a spare port).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 22:01:11 UTC 2024 - 2.4K bytes - Viewed (0)