Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 26 for Sum32 (0.04 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. src/compress/zlib/writer.go

    	if !z.wroteHeader {
    		z.err = z.writeHeader()
    	}
    	if z.err != nil {
    		return z.err
    	}
    	z.err = z.compressor.Close()
    	if z.err != nil {
    		return z.err
    	}
    	checksum := z.digest.Sum32()
    	// ZLIB (RFC 1950) is big-endian, unlike GZIP (RFC 1952).
    	binary.BigEndian.PutUint32(z.scratch[:], checksum)
    	_, z.err = z.w.Write(z.scratch[0:4])
    	return z.err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 27 18:51:27 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  7. pkg/kubelet/container/helpers.go

    func HashContainer(container *v1.Container) uint64 {
    	hash := fnv.New32a()
    	containerJSON, _ := json.Marshal(pickFieldsToHash(container))
    	hashutil.DeepHashObject(hash, containerJSON)
    	return uint64(hash.Sum32())
    }
    
    // pickFieldsToHash pick fields that will affect the running status of the container for hash,
    // currently this field range only contains `image` and `name`.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  8. pilot/pkg/serviceregistry/serviceentry/controller.go

    	// so that we can deterministically allocate an IP.
    	// We use "Double Hashning" for collision detection.
    	// The hash algorithm is
    	// - h1(k) = Sum32 hash of the service key (namespace + "/" + hostname)
    	// - Check if we have an empty slot for h1(x) % MAXIPS. Use it if available.
    	// - If there is a collision, apply second hash i.e. h2(x) = PRIME - (Key % PRIME)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 29 15:31:09 UTC 2024
    - 36.8K bytes
    - Viewed (0)
  9. pkg/controller/history/controller_history.go

    	}
    	if revision.Data.Object != nil {
    		hashutil.DeepHashObject(hf, revision.Data.Object)
    	}
    	if probe != nil {
    		hf.Write([]byte(strconv.FormatInt(int64(*probe), 10)))
    	}
    	return rand.SafeEncodeString(fmt.Sprint(hf.Sum32()))
    }
    
    // SortControllerRevisions sorts revisions by their Revision.
    func SortControllerRevisions(revisions []*apps.ControllerRevision) {
    	sort.Stable(byRevision(revisions))
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 13:33:52 UTC 2021
    - 18.2K bytes
    - Viewed (0)
  10. pkg/controller/tainteviction/taint_eviction.go

    type podUpdateItem struct {
    	podName      string
    	podNamespace string
    	nodeName     string
    }
    
    func hash(val string, max int) int {
    	hasher := fnv.New32a()
    	io.WriteString(hasher, val)
    	return int(hasher.Sum32() % uint32(max))
    }
    
    // GetPodsByNodeNameFunc returns the list of pods assigned to the specified node.
    type GetPodsByNodeNameFunc func(nodeName string) ([]*v1.Pod, error)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 04 18:33:12 UTC 2024
    - 19.9K bytes
    - Viewed (0)
Back to top