Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for DecryptETag (0.2 sec)

  1. cmd/encryption-v1.go

    		if err != nil {
    			return 0, errObjectTampered
    		}
    		size += int64(partSize)
    	}
    	return size, nil
    }
    
    // DecryptETag decrypts the ETag that is part of given object
    // with the given object encryption key.
    //
    // However, DecryptETag does not try to decrypt the ETag if
    // it consists of a 128 bit hex value (32 hex chars) and exactly
    // one '-' followed by a 32-bit number.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  2. cmd/encryption-v1_test.go

    		ETag:       "",
    		ShouldFail: true, // ETag contains multiple: -
    	},
    }
    
    func TestDecryptETag(t *testing.T) {
    	for i, test := range decryptETagTests {
    		etag, err := DecryptETag(test.ObjectKey, test.ObjectInfo)
    		if err != nil && !test.ShouldFail {
    			t.Fatalf("Test %d: should succeed but failed: %v", i, err)
    		}
    		if err == nil && test.ShouldFail {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Sat Sep 24 04:17:08 UTC 2022
    - 19.9K bytes
    - Viewed (0)
  3. cmd/object-multipart-handlers.go

    			}
    			if len(etag) >= 32 && strings.Count(etag, "-") != 1 {
    				etag = etag[len(etag)-32:]
    			}
    		case crypto.S3:
    			w.Header().Set(xhttp.AmzServerSideEncryption, xhttp.AmzEncryptionAES)
    			etag, _ = DecryptETag(objectEncryptionKey, ObjectInfo{ETag: etag})
    		case crypto.SSEC:
    			w.Header().Set(xhttp.AmzServerSideEncryptionCustomerAlgorithm, r.Header.Get(xhttp.AmzServerSideEncryptionCustomerAlgorithm))
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 14 13:28:35 UTC 2024
    - 38.8K bytes
    - Viewed (0)
  4. cmd/object-handlers.go

    	if kind, encrypted := crypto.IsEncrypted(objInfo.UserDefined); encrypted {
    		switch kind {
    		case crypto.S3:
    			w.Header().Set(xhttp.AmzServerSideEncryption, xhttp.AmzEncryptionAES)
    			objInfo.ETag, _ = DecryptETag(objectEncryptionKey, ObjectInfo{ETag: objInfo.ETag})
    		case crypto.S3KMS:
    			w.Header().Set(xhttp.AmzServerSideEncryption, xhttp.AmzEncryptionKMS)
    			w.Header().Set(xhttp.AmzServerSideEncryptionKmsID, objInfo.KMSKeyID())
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 14 13:28:35 UTC 2024
    - 124.2K bytes
    - Viewed (0)
Back to top