Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for Hash32 (0.11 sec)

  1. src/runtime/hash32.go

    Russ Cox <******@****.***> 1629910106 -0400
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 1.6K bytes
    - Viewed (0)
  2. 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)
  3. src/hash/crc32/crc32.go

    	tab *Table
    }
    
    // New creates a new [hash.Hash32] computing the CRC-32 checksum using the
    // 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)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  4. src/hash/hash.go

    	// The Write method must be able to accept any amount
    	// of data, but it may operate more efficiently if all writes
    	// are a multiple of the block size.
    	BlockSize() int
    }
    
    // Hash32 is the common interface implemented by all 32-bit hash functions.
    type Hash32 interface {
    	Hash
    	Sum32() uint32
    }
    
    // Hash64 is the common interface implemented by all 64-bit hash functions.
    type Hash64 interface {
    	Hash
    	Sum64() uint64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 19:15:34 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  5. src/hash/fnv/fnv.go

    // New32 returns a new 32-bit FNV-1 [hash.Hash].
    // Its Sum method will lay the value out in big-endian byte order.
    func New32() hash.Hash32 {
    	var s sum32 = offset32
    	return &s
    }
    
    // New32a returns a new 32-bit FNV-1a [hash.Hash].
    // Its Sum method will lay the value out in big-endian byte order.
    func New32a() hash.Hash32 {
    	var s sum32a = offset32
    	return &s
    }
    
    // New64 returns a new 64-bit FNV-1 [hash.Hash].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 22:36:41 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  6. src/compress/zlib/reader.go

    	ErrHeader = errors.New("zlib: invalid header")
    )
    
    type reader struct {
    	r            flate.Reader
    	decompressor io.ReadCloser
    	digest       hash.Hash32
    	err          error
    	scratch      [4]byte
    }
    
    // Resetter resets a ReadCloser returned by [NewReader] or [NewReaderDict]
    // to switch to a new underlying Reader. This permits reusing a ReadCloser
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 23:20:03 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  7. src/hash/crc32/crc32_test.go

    	b.Run("poly=IEEE", benchmarkAll(NewIEEE()))
    	b.Run("poly=Castagnoli", benchmarkAll(New(MakeTable(Castagnoli))))
    	b.Run("poly=Koopman", benchmarkAll(New(MakeTable(Koopman))))
    }
    
    func benchmarkAll(h hash.Hash32) func(b *testing.B) {
    	return func(b *testing.B) {
    		for _, size := range []int{15, 40, 512, 1 << 10, 4 << 10, 32 << 10} {
    			name := fmt.Sprint(size)
    			if size >= 1024 {
    				name = fmt.Sprintf("%dkB", size/1024)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  8. src/compress/zlib/writer.go

    // form of that data to an underlying writer (see NewWriter).
    type Writer struct {
    	w           io.Writer
    	level       int
    	dict        []byte
    	compressor  *flate.Writer
    	digest      hash.Hash32
    	err         error
    	scratch     [4]byte
    	wroteHeader bool
    }
    
    // NewWriter creates a new Writer.
    // Writes to the returned Writer are compressed and written to w.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 27 18:51:27 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  9. src/hash/fnv/fnv_test.go

    	h.Write(data[:2])
    	h.Write(data[2:])
    	if a := h.Sum(nil); !bytes.Equal(sum, a) {
    		t.Fatalf("Sum()=0x%x, but with partial writes, Sum()=0x%x", sum, a)
    	}
    
    	switch h.Size() {
    	case 4:
    		sum32 := h.(hash.Hash32).Sum32()
    		if sum32 != binary.BigEndian.Uint32(sum) {
    			t.Fatalf("Sum()=0x%x, but Sum32()=0x%x", sum, sum32)
    		}
    	case 8:
    		sum64 := h.(hash.Hash64).Sum64()
    		if sum64 != binary.BigEndian.Uint64(sum) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 01 21:04:12 UTC 2017
    - 7.3K bytes
    - Viewed (0)
  10. src/image/png/reader.go

    	dsSeenPLTE
    	dsSeentRNS
    	dsSeenIDAT
    	dsSeenIEND
    )
    
    const pngHeader = "\x89PNG\r\n\x1a\n"
    
    type decoder struct {
    	r             io.Reader
    	img           image.Image
    	crc           hash.Hash32
    	width, height int
    	depth         int
    	palette       color.Palette
    	cb            int
    	stage         int
    	idatLength    uint32
    	tmp           [3 * 256]byte
    	interlace     int
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:45 UTC 2023
    - 26K bytes
    - Viewed (0)
Back to top