Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for verifyCn (0.14 sec)

  1. internal/etag/reader.go

    			Tagger: t,
    		}
    	}
    	return wrapReader{
    		Reader: wrapped,
    	}
    }
    
    // A Reader wraps an io.Reader and computes the
    // MD5 checksum of the read content as ETag.
    //
    // Optionally, a Reader can also verify that
    // the computed ETag matches an expected value.
    // Therefore, it compares both ETags once the
    // underlying io.Reader returns io.EOF.
    // If the computed ETag does not match the
    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)
  2. src/archive/tar/reader.go

    		}
    		if bytes.Equal(tr.blk[:], zeroBlock[:]) {
    			return nil, nil, io.EOF // normal EOF; exactly 2 block of zeros read
    		}
    		return nil, nil, ErrHeader // Zero block and then non-zero block
    	}
    
    	// Verify the header matches a known format.
    	format := tr.blk.getFormat()
    	if format == FormatUnknown {
    		return nil, nil, ErrHeader
    	}
    
    	var p parser
    	hdr := new(Header)
    
    	// Unpack the V7 header.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
  3. internal/hash/reader.go

    	n, err := r.src.Read(p)
    	r.bytesRead += int64(n)
    	if r.sha256 != nil {
    		r.sha256.Write(p[:n])
    	}
    	if r.contentHasher != nil {
    		r.contentHasher.Write(p[:n])
    	}
    
    	if err == io.EOF { // Verify content SHA256, if set.
    		if r.expectedMin > 0 {
    			if r.bytesRead < r.expectedMin {
    				return 0, SizeTooSmall{Want: r.expectedMin, Got: r.bytesRead}
    			}
    		}
    		if r.expectedMax > 0 {
    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)
  4. src/archive/zip/reader.go

    				err = ErrChecksum
    			}
    		}
    	}
    	r.err = err
    	return
    }
    
    func (r *checksumReader) Close() error { return r.rc.Close() }
    
    // findBodyOffset does the minimum work to verify the file has a header
    // and returns the file body offset.
    func (f *File) findBodyOffset() (int64, error) {
    	var buf [fileHeaderLen]byte
    	if _, err := f.zipr.ReadAt(buf[:], f.headerOffset); err != nil {
    		return 0, err
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 18:36:46 GMT 2023
    - 27.7K bytes
    - Viewed (0)
Back to top