Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for Sum32 (0.04 sec)

  1. src/hash/fnv/fnv.go

    	s[1] = offset128Lower
    	return &s
    }
    
    func (s *sum32) Reset()   { *s = offset32 }
    func (s *sum32a) Reset()  { *s = offset32 }
    func (s *sum64) Reset()   { *s = offset64 }
    func (s *sum64a) Reset()  { *s = offset64 }
    func (s *sum128) Reset()  { s[0] = offset128Higher; s[1] = offset128Lower }
    func (s *sum128a) Reset() { s[0] = offset128Higher; s[1] = offset128Lower }
    
    func (s *sum32) Sum32() uint32  { return uint32(*s) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 18 22:36:41 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. pkg/util/hash/hash_test.go

    		hasher2 := adler32.New()
    		hasher3 := adler32.New()
    		// Act
    		DeepHashObject(hasher1, myUni1)
    		hash1 := hasher1.Sum32()
    		DeepHashObject(hasher1, myUni1)
    		hash1a := hasher1.Sum32()
    		DeepHashObject(hasher2, myUni2)
    		hash2 := hasher2.Sum32()
    		DeepHashObject(hasher3, myUni3)
    		hash3 := hasher3.Sum32()
    
    		// Assert
    		if hash1 != hash1a {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 27 01:24:22 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  3. src/hash/crc32/crc32_test.go

    				t.Errorf("could not unmarshal: %v", err)
    				continue
    			}
    
    			io.WriteString(h, g.in[len(g.in)/2:])
    			io.WriteString(h2, g.in[len(g.in)/2:])
    
    			if h.Sum32() != h2.Sum32() {
    				t.Errorf("IEEE(%s) = 0x%x != marshaled 0x%x", g.in, h.Sum32(), h2.Sum32())
    			}
    		}
    	})
    	t.Run("Castagnoli", func(t *testing.T) {
    		table := MakeTable(Castagnoli)
    		for _, g := range golden {
    			h := New(table)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  4. internal/ringbuffer/ring_buffer_test.go

    		}
    		t.Fatalf("expect read %d bytes but got %d", wroteBytes, readBytes)
    	}
    	if readHash.Sum32() != wroteHash.Sum32() {
    		t.Fatalf("expect read hash 0x%08x but got 0x%08x", readHash.Sum32(), wroteHash.Sum32())
    	}
    }
    
    func TestRingBuffer_BlockingBig(t *testing.T) {
    	// Typical runtime is ~5-10s.
    	defer timeout(60 * time.Second)()
    	const debug = false
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 15 00:11:04 UTC 2024
    - 26.8K bytes
    - Viewed (0)
  5. src/hash/hash.go

    	// 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)
  6. src/hash/crc32/crc32.go

    	// initialization in this case.
    	d.crc = update(d.crc, d.tab, p, false)
    	return len(p), nil
    }
    
    func (d *digest) Sum32() uint32 { return d.crc }
    
    func (d *digest) Sum(in []byte) []byte {
    	s := d.Sum32()
    	return append(in, byte(s>>24), byte(s>>16), byte(s>>8), byte(s))
    }
    
    // Checksum returns the CRC-32 checksum of data
    // using the polynomial represented by the [Table].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  7. pkg/kubelet/cm/dra/state/checkpoint.go

    	object = strings.Replace(object, "ClaimInfoStateListWithoutResourceHandles", "ClaimInfoStateList", 1)
    	hash := fnv.New32a()
    	fmt.Fprintf(hash, "%v", object)
    	if checkSum != checksum.Checksum(hash.Sum32()) {
    		return errors.ErrCorruptCheckpoint
    	}
    	return nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 15:23:10 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  8. src/hash/adler32/adler32.go

    		s1 %= mod
    		s2 %= mod
    		p = q
    	}
    	return digest(s2<<16 | s1)
    }
    
    func (d *digest) Write(p []byte) (nn int, err error) {
    	*d = update(*d, p)
    	return len(p), nil
    }
    
    func (d *digest) Sum32() uint32 { return uint32(*d) }
    
    func (d *digest) Sum(in []byte) []byte {
    	s := uint32(*d)
    	return append(in, byte(s>>24), byte(s>>16), byte(s>>8), byte(s))
    }
    
    // Checksum returns the Adler-32 checksum of data.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 12 05:36:29 UTC 2024
    - 3K bytes
    - Viewed (0)
  9. pkg/kubelet/cm/cpumanager/state/checkpoint.go

    	object = strings.Replace(object, "CPUManagerCheckpointV1", "CPUManagerCheckpoint", 1)
    	cp.Checksum = ck
    
    	hash := fnv.New32a()
    	fmt.Fprintf(hash, "%v", object)
    	if cp.Checksum != checksum.Checksum(hash.Sum32()) {
    		return errors.ErrCorruptCheckpoint
    	}
    
    	return nil
    }
    
    // VerifyChecksum verifies that current checksum of checkpoint is valid in v2 format
    func (cp *CPUManagerCheckpointV2) VerifyChecksum() error {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 27 01:24:22 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  10. src/compress/zlib/reader.go

    			err = io.ErrUnexpectedEOF
    		}
    		z.err = err
    		return n, z.err
    	}
    	// ZLIB (RFC 1950) is big-endian, unlike GZIP (RFC 1952).
    	checksum := binary.BigEndian.Uint32(z.scratch[:4])
    	if checksum != z.digest.Sum32() {
    		z.err = ErrChecksum
    		return n, z.err
    	}
    	return n, io.EOF
    }
    
    // Calling Close does not close the wrapped [io.Reader] originally passed to [NewReader].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 23:20:03 UTC 2023
    - 4.7K bytes
    - Viewed (0)
Back to top