Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 137 for Strand (0.26 sec)

  1. src/cmd/vendor/golang.org/x/tools/cmd/bisect/rand.go

    // license that can be found in the LICENSE file.
    
    // Starting in Go 1.20, the global rand is auto-seeded,
    // with a better value than the current Unix nanoseconds.
    // Only seed if we're using older versions of Go.
    
    //go:build !go1.20
    
    package main
    
    import (
    	"math/rand"
    	"time"
    )
    
    func init() {
    	rand.Seed(time.Now().UnixNano())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:10 UTC 2023
    - 442 bytes
    - Viewed (0)
  2. src/crypto/rand/rand.go

    // Copyright 2010 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 rand implements a cryptographically secure
    // random number generator.
    package rand
    
    import "io"
    
    // Reader is a global, shared instance of a cryptographically
    // secure random number generator.
    //
    //   - On Linux, FreeBSD, Dragonfly, and Solaris, Reader uses getrandom(2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 20:02:21 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  3. src/crypto/internal/edwards25519/field/fe_test.go

    	}
    )
    
    func generateWeirdFieldElement(rand *mathrand.Rand) Element {
    	return Element{
    		weirdLimbs52[rand.Intn(len(weirdLimbs52))],
    		weirdLimbs51[rand.Intn(len(weirdLimbs51))],
    		weirdLimbs51[rand.Intn(len(weirdLimbs51))],
    		weirdLimbs51[rand.Intn(len(weirdLimbs51))],
    		weirdLimbs51[rand.Intn(len(weirdLimbs51))],
    	}
    }
    
    func (Element) Generate(rand *mathrand.Rand, size int) reflect.Value {
    	if rand.Intn(2) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 17:26:17 UTC 2023
    - 13.9K bytes
    - Viewed (0)
  4. src/crypto/cipher/fuzz_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build ppc64le
    
    package cipher_test
    
    import (
    	"bytes"
    	"crypto/aes"
    	"crypto/cipher"
    	"crypto/rand"
    	"testing"
    	"time"
    )
    
    var cbcAESFuzzTests = []struct {
    	name string
    	key  []byte
    }{
    	{
    		"CBC-AES128",
    		commonKey128,
    	},
    	{
    		"CBC-AES192",
    		commonKey192,
    	},
    	{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 03 13:39:12 UTC 2022
    - 2K bytes
    - Viewed (0)
  5. src/crypto/x509/boring_test.go

    	"crypto/elliptic"
    	"crypto/internal/boring/fipstls"
    	"crypto/rand"
    	"crypto/rsa"
    	"crypto/x509/pkix"
    	"fmt"
    	"math/big"
    	"strings"
    	"testing"
    	"time"
    )
    
    const (
    	boringCertCA = iota
    	boringCertLeaf
    	boringCertFIPSOK = 0x80
    )
    
    func boringRSAKey(t *testing.T, size int) *rsa.PrivateKey {
    	k, err := rsa.GenerateKey(rand.Reader, size)
    	if err != nil {
    		t.Fatal(err)
    	}
    	return k
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 17 17:38:47 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  6. 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)
  7. src/cmd/go/internal/test/internal/genflags/vetflag.go

    		Usage string
    	}
    	if err := json.Unmarshal(out.Bytes(), &analysisFlags); err != nil {
    		return nil, fmt.Errorf("go vet: can't unmarshal JSON from %s -flags: %v", tool, err)
    	}
    
    	// parse the flags to figure out which ones stand for analyses
    	analyzerSet := make(map[string]bool)
    	rEnable := regexp.MustCompile("^enable .+ analysis$")
    	for _, flag := range analysisFlags {
    		if rEnable.MatchString(flag.Usage) {
    			analyzerSet[flag.Name] = true
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 17:49:12 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  8. src/crypto/ecdh/ecdh.go

    )
    
    type Curve interface {
    	// GenerateKey generates a random PrivateKey.
    	//
    	// Most applications should use [crypto/rand.Reader] as rand. Note that the
    	// returned key does not depend deterministically on the bytes read from rand,
    	// and may change between calls and/or between versions.
    	GenerateKey(rand io.Reader) (*PrivateKey, error)
    
    	// NewPrivateKey checks that key is valid and returns a PrivateKey.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  9. src/cmd/go/internal/lockedfile/lockedfile_plan9.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build plan9
    
    package lockedfile
    
    import (
    	"io/fs"
    	"math/rand"
    	"os"
    	"strings"
    	"time"
    )
    
    // Opening an exclusive-use file returns an error.
    // The expected error strings are:
    //
    //   - "open/create -- file is locked" (cwfs, kfs)
    //   - "exclusive lock" (fossil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 11 16:34:30 UTC 2022
    - 2.5K bytes
    - Viewed (0)
  10. src/cmd/doc/main.go

    // be true if the package path is a partial match for some directory
    // and there may be more matches. For example, if the argument
    // is rand.Float64, we must scan both crypto/rand and math/rand
    // to find the symbol, and the first call will return crypto/rand, true.
    func parseArgs(args []string) (pkg *build.Package, path, symbol string, more bool) {
    	wd, err := os.Getwd()
    	if err != nil {
    		log.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 12.2K bytes
    - Viewed (0)
Back to top