Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 473 for marshaled (0.53 sec)

  1. src/crypto/hmac/hmac.go

    type hmac struct {
    	opad, ipad   []byte
    	outer, inner hash.Hash
    
    	// If marshaled is true, then opad and ipad do not contain a padded
    	// copy of the key, but rather the marshaled state of outer/inner after
    	// opad/ipad has been fed into it.
    	marshaled bool
    }
    
    func (h *hmac) Sum(in []byte) []byte {
    	origLen := len(in)
    	in = h.inner.Sum(in)
    
    	if h.marshaled {
    		if err := h.outer.(marshalable).UnmarshalBinary(h.opad); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 17:09:47 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  2. src/crypto/tls/handshake_messages_test.go

    				if !ok {
    					t.Errorf("#%d: failed to create value", i)
    					break
    				}
    
    				m1 := v.Interface().(handshakeMessage)
    				marshaled := mustMarshal(t, m1)
    				if !m.unmarshal(marshaled) {
    					t.Errorf("#%d failed to unmarshal %#v %x", i, m1, marshaled)
    					break
    				}
    
    				if m, ok := m.(*SessionState); ok {
    					m.activeCertHandles = nil
    				}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  3. pkg/version/cobra.go

    						}
    					}
    				}
    			case "yaml":
    				if marshaled, err := yaml.Marshal(&version); err == nil {
    					_, _ = fmt.Fprintln(cmd.OutOrStdout(), string(marshaled))
    				}
    			case "json":
    				if marshaled, err := json.MarshalIndent(&version, "", "  "); err == nil {
    					_, _ = fmt.Fprintln(cmd.OutOrStdout(), string(marshaled))
    				}
    			}
    
    			return nil
    		},
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Aug 08 16:43:05 UTC 2023
    - 6.1K bytes
    - Viewed (0)
  4. src/internal/fuzz/encoding_test.go

    		b := marshalCorpusFile(x1)
    		t.Logf("marshaled math.Float64frombits(0x%x):\n%s", u1, b)
    
    		xs, err := unmarshalCorpusFile(b)
    		if err != nil {
    			t.Fatal(err)
    		}
    		if len(xs) != 1 {
    			t.Fatalf("unmarshaled %d values", len(xs))
    		}
    		x2 := xs[0].(float64)
    		u2 := math.Float64bits(x2)
    		if u2 != u1 {
    			t.Errorf("unmarshaled %v (bits 0x%x)", x2, u2)
    		}
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 00:20:34 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  5. src/encoding/asn1/marshal.go

    	return t, nil
    }
    
    // Marshal returns the ASN.1 encoding of val.
    //
    // In addition to the struct tags recognized by Unmarshal, the following can be
    // used:
    //
    //	ia5:         causes strings to be marshaled as ASN.1, IA5String values
    //	omitempty:   causes empty slices to be skipped
    //	printable:   causes strings to be marshaled as ASN.1, PrintableString values
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  6. 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)
  7. pkg/apis/core/json.go

    // to prevent anyone from marshaling these internal structs.
    
    var _ = json.Marshaler(&AvoidPods{})
    var _ = json.Unmarshaler(&AvoidPods{})
    
    // MarshalJSON panics to prevent marshalling of internal structs
    func (AvoidPods) MarshalJSON() ([]byte, error) { panic("do not marshal internal struct") }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 25 18:06:51 UTC 2019
    - 1.2K bytes
    - Viewed (0)
  8. src/math/big/floatmarsh.go

    const floatGobVersion byte = 1
    
    // GobEncode implements the [encoding/gob.GobEncoder] interface.
    // The [Float] value and all its attributes (precision,
    // rounding mode, accuracy) are marshaled.
    func (x *Float) GobEncode() ([]byte, error) {
    	if x == nil {
    		return nil, nil
    	}
    
    	// determine max. space (bytes) required for encoding
    	sz := 1 + 1 + 4 // version + mode|acc|form|neg (3+2+2+1bit) + prec
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:31:58 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apimachinery/pkg/util/managedfields/internal/managedfields_test.go

    			if err != nil {
    				t.Fatalf("did not expect encoding error but got: %v", err)
    			}
    			marshaled, err := yaml.Marshal(&encoded)
    			if err != nil {
    				t.Fatalf("did not expect yaml marshalling error but got: %v", err)
    			}
    			if !reflect.DeepEqual(string(marshaled), test) {
    				t.Fatalf("expected:\n%v\nbut got:\n%v", test, string(marshaled))
    			}
    		})
    	}
    }
    
    func TestBuildManagerIdentifier(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 21:44:00 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  10. src/hash/crc64/crc64_test.go

    import (
    	"encoding"
    	"io"
    	"testing"
    )
    
    type test struct {
    	outISO        uint64
    	outECMA       uint64
    	in            string
    	halfStateISO  string // ISO marshaled hash state after first half of in written, used by TestGoldenMarshal
    	halfStateECMA string // ECMA marshaled hash state after first half of in written, used by TestGoldenMarshal
    }
    
    var golden = []test{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 25 06:32:12 UTC 2018
    - 9.9K bytes
    - Viewed (0)
Back to top