Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for NewChecker (0.05 sec)

  1. internal/hash/checker.go

    // Checker allows to verify the checksum of a reader.
    type Checker struct {
    	c io.Closer
    	r io.Reader
    	h hash.Hash
    
    	want []byte
    }
    
    // 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}
    }
    
    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