Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for NewChecksumType (0.13 sec)

  1. internal/hash/checksum.go

    }
    
    // IsSet returns whether the type is valid and known.
    func (c ChecksumType) IsSet() bool {
    	return !c.Is(ChecksumInvalid) && !c.Is(ChecksumNone)
    }
    
    // NewChecksumType returns a checksum type based on the algorithm string.
    func NewChecksumType(alg string) ChecksumType {
    	switch strings.ToUpper(alg) {
    	case "CRC32":
    		return ChecksumCRC32
    	case "CRC32C":
    		return ChecksumCRC32C
    	case "SHA1":
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 08 16:18:34 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  2. cmd/object-multipart-handlers.go

    				writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    				return true
    			}
    			return checkPreconditionsPUT(ctx, w, r, oi, opts)
    		}
    	}
    
    	checksumType := hash.NewChecksumType(r.Header.Get(xhttp.AmzChecksumAlgo))
    	if checksumType.Is(hash.ChecksumInvalid) {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidRequestParameter), r.URL)
    		return
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 14 13:28:35 UTC 2024
    - 38.8K bytes
    - Viewed (0)
  3. cmd/erasure-multipart.go

    	}
    
    	// Checksum type set when upload started.
    	var checksumType hash.ChecksumType
    	if cs := fi.Metadata[hash.MinIOMultipartChecksum]; cs != "" {
    		checksumType = hash.NewChecksumType(cs)
    		if opts.WantChecksum != nil && !opts.WantChecksum.Type.Is(checksumType) {
    			return oi, InvalidArgument{
    				Bucket: bucket,
    				Object: fi.Name,
    				Err:    fmt.Errorf("checksum type mismatch"),
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 44.8K bytes
    - Viewed (0)
Back to top