- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 23 for BinaryMarshaler (0.29 sec)
-
doc/next/6-stdlib/99-minor/crypto/x509/66249.md
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 15:53:51 UTC 2024 - 238 bytes - Viewed (0) -
src/math/rand/v2/chacha8.go
if len(b) == 0 || len(b) < int(1+b[0]) { return nil, nil, false } return b[1 : 1+b[0]], b[1+b[0]:], true } // MarshalBinary implements the encoding.BinaryMarshaler interface. func (c *ChaCha8) MarshalBinary() ([]byte, error) { if c.readLen > 0 { out := []byte("readbuf:") out = append(out, uint8(c.readLen)) out = append(out, c.readBuf[len(c.readBuf)-c.readLen:]...)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:09:08 UTC 2024 - 2.8K bytes - Viewed (0) -
src/hash/crc32/crc32.go
// polynomial represented by the [Table]. Its Sum method will lay the // value out in big-endian byte order. The returned Hash32 also // implements [encoding.BinaryMarshaler] and [encoding.BinaryUnmarshaler] to // marshal and unmarshal the internal state of the hash. func New(tab *Table) hash.Hash32 { if tab == IEEETable { ieeeOnce.Do(ieeeInit) } return &digest{0, tab} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun May 12 05:36:29 UTC 2024 - 7.5K bytes - Viewed (0) -
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/hash/adler32/adler32.go
func (d *digest) Reset() { *d = 1 } // New returns a new hash.Hash32 computing the Adler-32 checksum. Its // Sum method will lay the value out in big-endian byte order. The // returned Hash32 also implements [encoding.BinaryMarshaler] and // [encoding.BinaryUnmarshaler] to marshal and unmarshal the internal // state of the hash. func New() hash.Hash32 { d := new(digest) d.Reset() return d }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun May 12 05:36:29 UTC 2024 - 3K bytes - Viewed (0) -
src/math/rand/v2/pcg.go
} // Seed resets the PCG to behave the same way as NewPCG(seed1, seed2). func (p *PCG) Seed(seed1, seed2 uint64) { p.hi = seed1 p.lo = seed2 } // MarshalBinary implements the encoding.BinaryMarshaler interface. func (p *PCG) MarshalBinary() ([]byte, error) { b := make([]byte, 20) copy(b, "pcg:") byteorder.BePutUint64(b[4:], p.hi) byteorder.BePutUint64(b[4+8:], p.lo) return b, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 21:31:58 UTC 2024 - 2.9K bytes - Viewed (0) -
src/crypto/tls/handshake_server_tls13.go
} return nil } // cloneHash uses the encoding.BinaryMarshaler and encoding.BinaryUnmarshaler // interfaces implemented by standard library hashes to clone the state of in // to a new instance of h. It returns nil if the operation fails. func cloneHash(in hash.Hash, h crypto.Hash) hash.Hash { // Recreate the interface to avoid importing encoding. type binaryMarshaler interface { MarshalBinary() (data []byte, 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) -
src/crypto/md5/md5.go
} func consumeUint32(b []byte) ([]byte, uint32) { return b[4:], byteorder.BeUint32(b[0:4]) } // New returns a new hash.Hash computing the MD5 checksum. The Hash also // implements [encoding.BinaryMarshaler] and [encoding.BinaryUnmarshaler] to // marshal and unmarshal the internal state of the hash. func New() hash.Hash { d := new(digest) d.Reset() return d }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 18:57:38 UTC 2024 - 4.3K bytes - Viewed (0) -
src/hash/crc64/crc64.go
// New creates a new hash.Hash64 computing the CRC-64 checksum using the // polynomial represented by the [Table]. Its Sum method will lay the // value out in big-endian byte order. The returned Hash64 also // implements [encoding.BinaryMarshaler] and [encoding.BinaryUnmarshaler] to // marshal and unmarshal the internal state of the hash. func New(tab *Table) hash.Hash64 { return &digest{0, tab} } func (d *digest) Size() int { return Size }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 22:36:41 UTC 2024 - 5.2K bytes - Viewed (0) -
src/hash/fnv/fnv.go
// created by Glenn Fowler, Landon Curt Noll, and Phong Vo. // See // https://en.wikipedia.org/wiki/Fowler-Noll-Vo_hash_function. // // All the hash.Hash implementations returned by this package also // implement encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to // marshal and unmarshal the internal state of the hash. package fnv import ( "errors" "hash" "internal/byteorder" "math/bits" ) type ( sum32 uint32
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 18 22:36:41 UTC 2024 - 8.5K bytes - Viewed (0)