Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SealETag (0.23 sec)

  1. internal/crypto/key.go

    	mac.Write(bin[:])
    	mac.Sum(partKey[:0])
    	return partKey
    }
    
    // SealETag seals the etag using the object key.
    // It does not encrypt empty ETags because such ETags indicate
    // that the S3 client hasn't sent an ETag = MD5(object) and
    // the backend can pick an ETag value.
    func (key ObjectKey) SealETag(etag []byte) []byte {
    	if len(etag) == 0 { // don't encrypt empty ETag - only if client sent ETag = MD5(object)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 19 20:28:10 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  2. internal/crypto/key_test.go

    		key[i] = byte(i)
    	}
    	for i, etag := range sealUnsealETagTests {
    		tag, err := hex.DecodeString(etag)
    		if err != nil {
    			t.Errorf("Test %d: failed to decode etag: %s", i, err)
    		}
    		sealedETag := key.SealETag(tag)
    		unsealedETag, err := key.UnsealETag(sealedETag)
    		if err != nil {
    			t.Errorf("Test %d: failed to decrypt etag: %s", i, err)
    		}
    		if !bytes.Equal(unsealedETag, tag) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 02 00:13:57 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  3. cmd/object-api-utils.go

    }
    
    func sealETag(encKey crypto.ObjectKey, md5CurrSum []byte) []byte {
    	var emptyKey [32]byte
    	if bytes.Equal(encKey[:], emptyKey[:]) {
    		return md5CurrSum
    	}
    	return encKey.SealETag(md5CurrSum)
    }
    
    func sealETagFn(key crypto.ObjectKey) SealMD5CurrFn {
    	fn := func(md5sumcurr []byte) []byte {
    		return sealETag(key, md5sumcurr)
    	}
    	return fn
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Mar 11 11:55:34 GMT 2024
    - 35.6K bytes
    - Viewed (1)
Back to top