Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 89 for newInt (0.27 sec)

  1. src/crypto/x509/oid.go

    	var (
    		first  = big.NewInt(0)
    		second = big.NewInt(0)
    	)
    
    	if _, ok := first.SetString(firstNum, 10); !ok {
    		return errInvalidOID
    	}
    	if _, ok := second.SetString(secondNum, 10); !ok {
    		return errInvalidOID
    	}
    
    	if first.Cmp(big.NewInt(2)) > 0 || (first.Cmp(big.NewInt(2)) < 0 && second.Cmp(big.NewInt(40)) >= 0) {
    		return errInvalidOID
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  2. src/math/big/int_test.go

    	z, x, y *Int
    }
    
    var sumZZ = []argZZ{
    	{NewInt(0), NewInt(0), NewInt(0)},
    	{NewInt(1), NewInt(1), NewInt(0)},
    	{NewInt(1111111110), NewInt(123456789), NewInt(987654321)},
    	{NewInt(-1), NewInt(-1), NewInt(0)},
    	{NewInt(864197532), NewInt(-123456789), NewInt(987654321)},
    	{NewInt(-1111111110), NewInt(-123456789), NewInt(-987654321)},
    }
    
    var prodZZ = []argZZ{
    	{NewInt(0), NewInt(0), NewInt(0)},
    	{NewInt(0), NewInt(1), NewInt(0)},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  3. src/crypto/internal/mlkem768/mlkem768_test.go

    }
    
    func TestZetas(t *testing.T) {
    	ζ := big.NewInt(17)
    	q := big.NewInt(q)
    	for k, zeta := range zetas {
    		// ζ^BitRev7(k) mod q
    		exp := new(big.Int).Exp(ζ, big.NewInt(int64(BitRev7(uint8(k)))), q)
    		if big.NewInt(int64(zeta)).Cmp(exp) != 0 {
    			t.Errorf("zetas[%d] = %v, expected %v", k, zeta, exp)
    		}
    	}
    }
    
    func TestGammas(t *testing.T) {
    	ζ := big.NewInt(17)
    	q := big.NewInt(q)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 15:27:18 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		expect string
    	}{
    		{bigDec(big.NewInt(1), 0), "1"},
    		{bigDec(big.NewInt(1), 1), "10"},
    		{bigDec(big.NewInt(5), 2), "500"},
    		{bigDec(big.NewInt(8), 3), "8000"},
    		{bigDec(big.NewInt(2), 0), "2"},
    		{bigDec(big.NewInt(1), -1), "0.1"},
    		{bigDec(big.NewInt(3), -2), "0.03"},
    		{bigDec(big.NewInt(4), -3), "0.004"},
    		{bigDec(big.NewInt(0).Add(bigMostPositive, big.NewInt(1)), 0), "9223372036854775808"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  5. src/crypto/x509/x509_test.go

    	revokedCerts := []pkix.RevokedCertificate{
    		{
    			SerialNumber:   big.NewInt(1),
    			RevocationTime: nowUTC,
    		},
    		{
    			SerialNumber: big.NewInt(42),
    			// RevocationTime should be converted to UTC before marshaling.
    			RevocationTime: now,
    		},
    	}
    	expectedCerts := []pkix.RevokedCertificate{
    		{
    			SerialNumber:   big.NewInt(1),
    			RevocationTime: nowUTC,
    		},
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  6. pkg/registry/core/service/portallocator/allocator_test.go

    	}
    }
    
    func TestForEach(t *testing.T) {
    	pr, err := net.ParsePortRange("10000-10200")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	testCases := []sets.Int{
    		sets.NewInt(),
    		sets.NewInt(10000),
    		sets.NewInt(10000, 10200),
    		sets.NewInt(10000, 10099, 10200),
    	}
    
    	for i, tc := range testCases {
    		r, err := NewInMemory(*pr)
    		if err != nil {
    			t.Fatal(err)
    		}
    
    		for port := range tc {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 14K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/assign.go

    		ptr2, len2 := backingArrayPtrLen(l2)
    
    		fn := typecheck.LookupRuntime("slicecopy", ptr1.Type().Elem(), ptr2.Type().Elem())
    		ncopy = mkcall1(fn, types.Types[types.TINT], &nodes, ptr1, len1, ptr2, len2, ir.NewInt(base.Pos, elemtype.Size()))
    	} else {
    		// memmove(&s[idx], &l2[0], len(l2)*sizeof(T))
    		ix := ir.NewIndexExpr(base.Pos, s, idx)
    		ix.SetBounded(true)
    		addr := typecheck.NodAddr(ix)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  8. src/math/big/bits_test.go

    		return new(Float)
    	}
    	// len(bits) > 0
    
    	// determine lsb exponent
    	var min int
    	for i, b := range bits {
    		if i == 0 || b < min {
    			min = b
    		}
    	}
    
    	// create bit pattern
    	x := NewInt(0)
    	for _, b := range bits {
    		badj := b - min
    		// propagate carry if necessary
    		for x.Bit(badj) != 0 {
    			x.SetBit(x, badj, 0)
    			badj++
    		}
    		x.SetBit(x, badj, 1)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  9. src/crypto/rsa/rsa.go

    		Qinv, err := bigmod.NewNat().SetBytes(priv.Precomputed.Qinv.Bytes(), P)
    		if err != nil {
    			return nil, ErrDecryption
    		}
    		c, err = bigmod.NewNat().SetBytes(ciphertext, N)
    		if err != nil {
    			return nil, ErrDecryption
    		}
    
    		// m = c ^ Dp mod p
    		m = bigmod.NewNat().Exp(t0.Mod(c, P), priv.Precomputed.Dp.Bytes(), P)
    		// m2 = c ^ Dq mod q
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:11:18 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  10. pkg/registry/certificates/certificates/storage/metrics_test.go

    	now := time.Now()
    	tmpl := &x509.Certificate{Subject: pkix.Name{CommonName: "panda"}, SerialNumber: big.NewInt(1234), NotBefore: now, NotAfter: now.Add(duration)}
    
    	der, err := x509.CreateCertificate(rand.Reader, tmpl, caCert, crPublicKey, caPrivateKey)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 15 14:34:53 UTC 2024
    - 13.7K bytes
    - Viewed (0)
Back to top