Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IsETagSealed (0.2 sec)

  1. internal/crypto/metadata.go

    	if metadata == nil {
    		return map[string]string{MetaMultipart: ""}
    	}
    	metadata[MetaMultipart] = ""
    	return metadata
    }
    
    // IsETagSealed returns true if the etag seems to be encrypted.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 17:40:33 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  2. internal/crypto/key.go

    // because such ETags indicate that the S3 client hasn't sent
    // an ETag = MD5(object) and the backend has picked an ETag value.
    func (key ObjectKey) UnsealETag(etag []byte) ([]byte, error) {
    	if !IsETagSealed(etag) {
    		return etag, nil
    	}
    	mac := hmac.New(sha256.New, key[:])
    	mac.Write([]byte("SSE-etag"))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Mar 19 20:28:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. internal/crypto/metadata_test.go

    func TestIsETagSealed(t *testing.T) {
    	for i, test := range isETagSealedTests {
    		etag, err := hex.DecodeString(test.ETag)
    		if err != nil {
    			t.Errorf("Test %d: failed to decode etag: %s", i, err)
    		}
    		if sealed := IsETagSealed(etag); sealed != test.IsSealed {
    			t.Errorf("Test %d: got %v - want %v", i, sealed, test.IsSealed)
    		}
    	}
    }
    
    var removeInternalEntriesTests = []struct {
    	Metadata, Expected map[string]string
    }{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 18.7K bytes
    - Viewed (0)
Back to top