Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 752 for marshal1 (0.83 sec)

  1. src/crypto/x509/sec1.go

    	}
    	privateKey := make([]byte, (key.Curve.Params().N.BitLen()+7)/8)
    	return asn1.Marshal(ecPrivateKey{
    		Version:       1,
    		PrivateKey:    key.D.FillBytes(privateKey),
    		NamedCurveOID: oid,
    		PublicKey:     asn1.BitString{Bytes: elliptic.Marshal(key.Curve, key.X, key.Y)},
    	})
    }
    
    // marshalECDHPrivateKey marshals an EC private key into ASN.1, DER format
    // suitable for NIST curves.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. src/hash/example_test.go

    		input2 = "unaware of what he will find."
    	)
    
    	first := sha256.New()
    	first.Write([]byte(input1))
    
    	marshaler, ok := first.(encoding.BinaryMarshaler)
    	if !ok {
    		log.Fatal("first does not implement encoding.BinaryMarshaler")
    	}
    	state, err := marshaler.MarshalBinary()
    	if err != nil {
    		log.Fatal("unable to marshal hash:", err)
    	}
    
    	second := sha256.New()
    
    	unmarshaler, ok := second.(encoding.BinaryUnmarshaler)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 04 03:47:34 UTC 2017
    - 1.2K bytes
    - Viewed (0)
  3. pkg/volume/csi/nodeinfomanager/nodeinfomanager_test.go

    	}
    
    	if len(capacity) > 0 {
    		node.Status.Capacity = v1.ResourceList(capacity)
    		node.Status.Allocatable = v1.ResourceList(capacity)
    	}
    	return node
    }
    
    func marshall(nodeIDs nodeIDMap) string {
    	b, _ := json.Marshal(nodeIDs)
    	return string(b)
    }
    
    func generateCSINode(nodeIDs nodeIDMap, volumeLimits *storage.VolumeNodeResources, topologyKeys topologyKeyMap) *storage.CSINode {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 17 02:02:59 UTC 2022
    - 34.3K bytes
    - Viewed (0)
  4. src/crypto/x509/pkcs8_test.go

    			continue
    		}
    		reserialised, err := MarshalPKCS8PrivateKey(privKey)
    		if err != nil {
    			t.Errorf("%s: failed to marshal into PKCS#8: %s", test.name, err)
    			continue
    		}
    		if !bytes.Equal(derBytes, reserialised) {
    			t.Errorf("%s: marshaled PKCS#8 didn't match original: got %x, want %x", test.name, reserialised, derBytes)
    			continue
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Nov 19 16:45:10 UTC 2022
    - 9K bytes
    - Viewed (0)
  5. operator/pkg/apis/istio/v1alpha1/value_types_json.go

    	return nil
    }
    
    func (this *IntOrString) MarshalJSONPB(_ *github_com_golang_protobuf_jsonpb.Marshaler) ([]byte, error) {
    	return this.MarshalJSON()
    }
    
    func (this *IntOrString) MarshalJSON() ([]byte, error) {
    	if this.IntVal != nil {
    		return json.Marshal(this.IntVal.GetValue())
    	}
    	return json.Marshal(this.StrVal.GetValue())
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Apr 21 17:42:54 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/runtime/types_proto.go

    			}
    		} else {
    			i -= int(size)
    			n1, err := b.MarshalTo(data[i:])
    			if err != nil {
    				return 0, err
    			}
    			if uint64(n1) != size {
    				// programmer error: the Size() method for protobuf does not match the results of MarshalTo, which means the proto
    				// struct returned would be wrong.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Jul 25 18:54:00 UTC 2019
    - 2.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go

    func (m *Quantity) Marshal() (data []byte, err error) {
    	size := m.Size()
    	data = make([]byte, size)
    	n, err := m.MarshalToSizedBuffer(data[:size])
    	if err != nil {
    		return nil, err
    	}
    	return data[:n], nil
    }
    
    // MarshalTo is a customized version of the generated Protobuf unmarshaler for a struct
    // with a single string field.
    func (m *Quantity) MarshalTo(data []byte) (int, error) {
    	size := m.Size()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 21 05:31:33 UTC 2021
    - 6K bytes
    - Viewed (0)
  8. src/encoding/xml/marshal_test.go

    	if got != want {
    		t.Fatalf("unexpected unmarshal result, want %f but got %f", want, got)
    	}
    
    	// Marshal again (or Encode again)
    	// In issue 50164, here `Marshal(l1)` will panic because of the zero value of xml attribute ValueTwo `value_two`.
    	anotherXML, err := Marshal(l1)
    	if err != nil {
    		t.Fatalf("marshal XML error: %v", err)
    	}
    	if string(anotherXML) != proofXml {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 18:46:41 UTC 2024
    - 66K bytes
    - Viewed (0)
  9. src/internal/chacha8rand/chacha8.go

    				break
    			}
    			s.Refill()
    		}
    	}
    	s.Init64(seed)
    }
    
    // Marshal marshals the state into a byte slice.
    // Marshal and Unmarshal are functions, not methods,
    // so that they will not be linked into the runtime
    // when it uses the State struct, since the runtime
    // does not need these.
    func Marshal(s *State) []byte {
    	data := make([]byte, 6*8)
    	copy(data, "chacha8:")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:47:29 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/micro_time.go

    }
    
    // MarshalJSON implements the json.Marshaler interface.
    func (t MicroTime) MarshalJSON() ([]byte, error) {
    	if t.IsZero() {
    		// Encode unset/nil objects as JSON's "null".
    		return []byte("null"), nil
    	}
    
    	return json.Marshal(t.UTC().Format(RFC3339Micro))
    }
    
    func (t MicroTime) MarshalCBOR() ([]byte, error) {
    	if t.IsZero() {
    		return cbor.Marshal(nil)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 5.2K bytes
    - Viewed (0)
Back to top