Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewChecksumFromData (0.08 sec)

  1. internal/hash/checksum.go

    	return nil
    }
    
    // Trailing return whether the checksum is trailing.
    func (c ChecksumType) Trailing() bool {
    	return c.Is(ChecksumTrailing)
    }
    
    // NewChecksumFromData returns a new checksum from specified algorithm and base64 encoded value.
    func NewChecksumFromData(t ChecksumType, data []byte) *Checksum {
    	if !t.IsSet() {
    		return nil
    	}
    	h := t.Hasher()
    	h.Write(data)
    	raw := h.Sum(nil)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Sep 19 12:59:07 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  2. cmd/erasure-multipart.go

    		delete(opts.UserDefined, ReplicationSsecChecksumHeader)
    	}
    
    	if checksumType.IsSet() {
    		checksumType |= hash.ChecksumMultipart | hash.ChecksumIncludesMultipart
    		var cs *hash.Checksum
    		cs = hash.NewChecksumFromData(checksumType, checksumCombined)
    		fi.Checksum = cs.AppendTo(nil, checksumCombined)
    		if opts.EncryptFn != nil {
    			fi.Checksum = opts.EncryptFn("object-checksum", fi.Checksum)
    		}
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 44.7K bytes
    - Viewed (0)
Back to top