Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Sum (0.21 sec)

  1. internal/hash/reader.go

    				return 0, SizeTooLarge{Want: r.expectedMax, Got: r.bytesRead}
    			}
    		}
    
    		if r.sha256 != nil {
    			if sum := r.sha256.Sum(nil); !bytes.Equal(r.contentSHA256, sum) {
    				return n, SHA256Mismatch{
    					ExpectedSHA256:   hex.EncodeToString(r.contentSHA256),
    					CalculatedSHA256: hex.EncodeToString(sum),
    				}
    			}
    		}
    		if r.contentHasher != nil {
    			if r.contentHash.Type.Trailing() {
    				var err error
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.8K bytes
    - Viewed (0)
  2. internal/etag/reader.go

    // so far. Reading more content changes the MD5
    // checksum. Therefore, calling ETag multiple
    // times may return different results.
    func (r *Reader) ETag() ETag {
    	sum := r.md5.Sum(nil)
    	return ETag(sum)
    }
    
    // VerifyError is an error signaling that a
    // computed ETag does not match an expected
    // ETag.
    type VerifyError struct {
    	Expected ETag
    	Computed ETag
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 4.8K bytes
    - Viewed (0)
Back to top