- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for BinaryMarshaler (0.23 sec)
-
src/hash/crc32/crc32_test.go
t.Run("IEEE", func(t *testing.T) { for _, g := range golden { h := New(IEEETable) h2 := New(IEEETable) io.WriteString(h, g.in[:len(g.in)/2]) state, err := h.(encoding.BinaryMarshaler).MarshalBinary() if err != nil { t.Errorf("could not marshal: %v", err) continue } if string(state) != g.halfStateIEEE {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 03 14:56:25 UTC 2024 - 12.1K bytes - Viewed (0) -
src/crypto/x509/oid.go
if !ok { return errInvalidOID } der = appendBase128BigInt(der, b) } o.der = der return nil } // MarshalBinary implements [encoding.BinaryMarshaler] func (o OID) MarshalBinary() ([]byte, error) { return bytes.Clone(o.der), nil } // UnmarshalBinary implements [encoding.BinaryUnmarshaler] func (o *OID) UnmarshalBinary(b []byte) error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 19:10:38 UTC 2024 - 8.3K bytes - Viewed (0) -
src/crypto/x509/oid_test.go
} for _, tt := range cases { if eq := tt.oid.Equal(tt.oid2); eq != tt.eq { t.Errorf("(%v).Equal(%v) = %v, want %v", tt.oid, tt.oid2, eq, tt.eq) } } } var ( _ encoding.BinaryMarshaler = OID{} _ encoding.BinaryUnmarshaler = new(OID) _ encoding.TextMarshaler = OID{} _ encoding.TextUnmarshaler = new(OID) ) func TestOIDMarshal(t *testing.T) { cases := []struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 19:10:38 UTC 2024 - 10.8K bytes - Viewed (0) -
src/net/netip/netip.go
byteorder.BePutUint64(b[:8], ip.addr.hi) byteorder.BePutUint64(b[8:], ip.addr.lo) copy(b[16:], z) } return b } // MarshalBinary implements the [encoding.BinaryMarshaler] interface. // It returns a zero-length slice for the zero [Addr], // the 4-byte form for an IPv4 address, // and the 16-byte form with zone appended for an IPv6 address.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 17:10:01 UTC 2024 - 43.2K bytes - Viewed (0)