Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for wantSum (0.03 sec)

  1. internal/hash/checker.go

    // NewChecker ensures that content with the specified length is read from rc.
    // Calling Close on this will close upstream.
    func NewChecker(rc io.ReadCloser, h hash.Hash, wantSum []byte, length int64) *Checker {
    	return &Checker{c: rc, r: ioutil.HardLimitReader(rc, length), h: h, want: wantSum}
    }
    
    // Read satisfies io.Reader
    func (c Checker) Read(p []byte) (n int, err error) {
    	n, err = c.r.Read(p)
    	if n > 0 {
    		c.h.Write(p[:n])
    	}
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Mon Jan 20 14:49:07 UTC 2025
    - 1.8K bytes
    - Viewed (0)
Back to top