Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 72 for doDecode (0.77 sec)

  1. src/encoding/binary/binary_test.go

    }{
    	{
    		"Read",
    		func(order ByteOrder, data any, buf []byte) error {
    			return Read(bytes.NewReader(buf), order, data)
    		},
    	},
    	{
    		"Decode",
    		func(order ByteOrder, data any, buf []byte) error {
    			n, err := Decode(buf, order, data)
    			if err == nil && n != Size(data) {
    				return fmt.Errorf("returned size %d instead of %d", n, Size(data))
    			}
    			return err
    		},
    	},
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 19:16:18 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  2. src/encoding/binary/binary.go

    	if _, err := io.ReadFull(r, d.buf); err != nil {
    		return err
    	}
    	d.value(v)
    	return nil
    }
    
    // Decode decodes binary data from buf into data according to
    // the given byte order.
    // It returns an error if buf is too small, otherwise the number of
    // bytes consumed from buf.
    func Decode(buf []byte, order ByteOrder, data any) (int, error) {
    	if n, _ := intDataSize(data); n != 0 {
    		if len(buf) < n {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 17:29:31 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  3. src/crypto/tls/tls.go

    	fail := func(err error) (Certificate, error) { return Certificate{}, err }
    
    	var cert Certificate
    	var skippedBlockTypes []string
    	for {
    		var certDERBlock *pem.Block
    		certDERBlock, certPEMBlock = pem.Decode(certPEMBlock)
    		if certDERBlock == nil {
    			break
    		}
    		if certDERBlock.Type == "CERTIFICATE" {
    			cert.Certificate = append(cert.Certificate, certDERBlock.Bytes)
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  4. internal/event/target/elasticsearch.go

    		c.Info.WithContext(ctx),
    	)
    	if err != nil {
    		return ESSUnknown, "", store.ErrNotConnected
    	}
    
    	defer resp.Body.Close()
    
    	m := make(map[string]interface{})
    	err = json.NewDecoder(resp.Body).Decode(&m)
    	if err != nil {
    		return ESSUnknown, "", fmt.Errorf("unable to get ES Server version - json parse error: %v", err)
    	}
    
    	if v, ok := m["version"].(map[string]interface{}); ok {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 15K bytes
    - Viewed (0)
  5. cmd/auth-handler.go

    	if newGlobalAuthZPluginFn() != nil {
    		return claims.Map(), nil
    	}
    
    	// Check if a session policy is set. If so, decode it here.
    	sp, spok := claims.Lookup(policy.SessionPolicyName)
    	if spok {
    		// Looks like subpolicy is set and is a string, if set then its
    		// base64 encoded, decode it. Decoding fails reject such
    		// requests.
    		spBytes, err := base64.StdEncoding.DecodeString(sp)
    		if err != nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 26K bytes
    - Viewed (0)
  6. docs/debugging/xl-meta/main.go

    		foundData := make(map[string][]byte)
    		partDataToVerID := make(map[string][2]string)
    		var baseName string
    		// versionID ->
    		combineFiles := make(map[string][]string)
    		decode := func(r io.Reader, file string) ([]byte, error) {
    			file = strings.ReplaceAll(file, ":", "_")
    			b, err := io.ReadAll(r)
    			if err != nil {
    				return nil, err
    			}
    			b, _, minor, err := checkXL2V1(b)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 31 14:49:23 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  7. src/crypto/tls/handshake_messages_test.go

    	clientHelloBytes, err := hex.DecodeString("010000440303000000000000000000000000000000000000000000000000000000000000000000000000001c0000000a000800000568656c6c6f0000000a000800000568656c6c6f")
    	if err != nil {
    		t.Fatalf("failed to decode test ClientHello: %s", err)
    	}
    	var clientHelloCopy clientHelloMsg
    	if clientHelloCopy.unmarshal(clientHelloBytes) {
    		t.Error("Unmarshaled ClientHello with duplicate extensions")
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  8. src/crypto/tls/boring_test.go

    // RSA-PSS with SHA512. SAN of example.golang.
    var (
    	testRSA2048Certificate []byte
    	testRSA2048PrivateKey  *rsa.PrivateKey
    )
    
    func init() {
    	block, _ := pem.Decode(obscuretestdata.Rot13([]byte(`
    -----ORTVA PREGVSVPNGR-----
    ZVVP/mPPNrrtNjVONtVENYUUK/xu4+4mZH9QnemORpDjQDLWXbMVuipANDRYODNj
    RwRDZN4TN1HRPuZUDJAgMFOQomNrSj0kZGNkZQRkAGN0ZQInSj0lZQRlZwxkAGN0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:45:37 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  9. platforms/core-configuration/core-serialization-codecs/src/main/kotlin/org/gradle/internal/serialize/codecs/core/FileCollectionCodec.kt

            val visitor = CollectingVisitor()
            value.visitStructure(visitor)
            writeCollection(visitor.elements)
        }
    
        override suspend fun ReadContext.decode(): FileCollectionInternal {
            return decodePreservingIdentity { id ->
                val fileCollection = decodeContents()
                isolate.identities.putInstance(id, fileCollection)
                fileCollection
            }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 23:09:56 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  10. internal/bucket/lifecycle/lifecycle.go

    // ParseLifecycleConfigWithID - parses for a Lifecycle config and assigns
    // unique id to rules with empty ID.
    func ParseLifecycleConfigWithID(r io.Reader) (*Lifecycle, error) {
    	var lc Lifecycle
    	if err := xml.NewDecoder(r).Decode(&lc); err != nil {
    		return nil, err
    	}
    	// assign a unique id for rules with empty ID
    	for i := range lc.Rules {
    		if lc.Rules[i].ID == "" {
    			lc.Rules[i].ID = uuid.New().String()
    		}
    	}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 23 01:12:48 UTC 2024
    - 17.9K bytes
    - Viewed (0)
Back to top