Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 150 for bitLen (0.11 sec)

  1. src/crypto/x509/x509.go

    // matches ASN.1, but differs from almost everything else.
    func asn1BitLength(bitString []byte) int {
    	bitLen := len(bitString) * 8
    
    	for i := range bitString {
    		b := bitString[len(bitString)-i-1]
    
    		for bit := uint(0); bit < 8; bit++ {
    			if (b>>bit)&1 == 1 {
    				return bitLen
    			}
    			bitLen--
    		}
    	}
    
    	return 0
    }
    
    var (
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:20:15 UTC 2024
    - 82K bytes
    - Viewed (0)
  2. pilot/pkg/networking/util/util.go

    	}
    
    	// Otherwise it is a raw IP. Make it a /32 or /128 depending on family
    	ipa, err := netip.ParseAddr(addr)
    	if err != nil {
    		return netip.Prefix{}, err
    	}
    
    	return netip.PrefixFrom(ipa, ipa.BitLen()), nil
    }
    
    // AddrStrToCidrRange converts from string to CIDR proto
    func AddrStrToCidrRange(addr string) (*core.CidrRange, error) {
    	prefix, err := AddrStrToPrefix(addr)
    	if err != nil {
    		return nil, err
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  3. src/crypto/tls/handshake_server.go

    			c.sendAlert(alertBadCertificate)
    			return errors.New("tls: failed to parse client certificate: " + err.Error())
    		}
    		if certs[i].PublicKeyAlgorithm == x509.RSA {
    			n := certs[i].PublicKey.(*rsa.PublicKey).N.BitLen()
    			if max, ok := checkKeySize(n); !ok {
    				c.sendAlert(alertBadCertificate)
    				return fmt.Errorf("tls: client sent certificate containing RSA key larger than %d bits", max)
    			}
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:30:50 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  4. src/net/netip/netip_test.go

    	test("IPv6Unspecified", func() { sinkIP = IPv6Unspecified() })
    
    	// Addr methods
    	test("Addr.IsZero", func() { sinkBool = MustParseAddr("1.2.3.4").IsZero() })
    	test("Addr.BitLen", func() { sinkBool = MustParseAddr("1.2.3.4").BitLen() == 8 })
    	test("Addr.Zone/4", func() { sinkBool = MustParseAddr("1.2.3.4").Zone() == "" })
    	test("Addr.Zone/6", func() { sinkBool = MustParseAddr("fe80::1").Zone() == "" })
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 54.3K bytes
    - Viewed (0)
  5. src/crypto/tls/handshake_server_tls13.go

    	if err != nil {
    		public := hs.cert.PrivateKey.(crypto.Signer).Public()
    		if rsaKey, ok := public.(*rsa.PublicKey); ok && sigType == signatureRSAPSS &&
    			rsaKey.N.BitLen()/8 < sigHash.Size()*2+2 { // key too small for RSA-PSS
    			c.sendAlert(alertHandshakeFailure)
    		} else {
    			c.sendAlert(alertInternalError)
    		}
    		return errors.New("tls: failed to sign handshake: " + err.Error())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:23:54 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  6. src/crypto/tls/handshake_client.go

    			c.sendAlert(alertBadCertificate)
    			return errors.New("tls: failed to parse certificate from server: " + err.Error())
    		}
    		if cert.cert.PublicKeyAlgorithm == x509.RSA {
    			n := cert.cert.PublicKey.(*rsa.PublicKey).N.BitLen()
    			if max, ok := checkKeySize(n); !ok {
    				c.sendAlert(alertBadCertificate)
    				return fmt.Errorf("tls: server sent certificate containing RSA key larger than %d bits", max)
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 38.6K bytes
    - Viewed (0)
  7. src/crypto/x509/x509_test.go

    	tests := []struct {
    		bytes  []byte
    		bitLen int
    	}{
    		{nil, 0},
    		{[]byte{0x00}, 0},
    		{[]byte{0x00, 0x00}, 0},
    		{[]byte{0xf0}, 4},
    		{[]byte{0x88}, 5},
    		{[]byte{0xff}, 8},
    		{[]byte{0xff, 0x80}, 9},
    		{[]byte{0xff, 0x81}, 16},
    	}
    
    	for i, test := range tests {
    		if got := asn1BitLength(test.bytes); got != test.bitLen {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  8. api/go1.5.txt

    pkg go/constant, const String Kind
    pkg go/constant, const Unknown = 0
    pkg go/constant, const Unknown Kind
    pkg go/constant, func BinaryOp(Value, token.Token, Value) Value
    pkg go/constant, func BitLen(Value) int
    pkg go/constant, func BoolVal(Value) bool
    pkg go/constant, func Bytes(Value) []uint8
    pkg go/constant, func Compare(Value, token.Token, Value) bool
    pkg go/constant, func Denom(Value) Value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 30 21:14:09 UTC 2015
    - 46.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ir/bitset.go

    cuiweixie <******@****.***> 1664452800 +0800
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 29 22:03:56 UTC 2022
    - 734 bytes
    - Viewed (0)
  10. staging/src/k8s.io/cli-runtime/artifacts/kitten-rc.yaml

    apiVersion: v1
    kind: ReplicationController
    metadata:
      name: update-demo-kitten
    spec:
      selector:
        name: update-demo
        version: kitten
      template:
        metadata:
          labels:
            name: update-demo
            version: kitten
        spec:
          containers:
          - image: registry.k8s.io/update-demo:kitten
            name: update-demo
            ports:
            - containerPort: 80
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 31 14:16:53 UTC 2022
    - 401 bytes
    - Viewed (0)
Back to top