Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 25 for IsEncrypted (0.12 sec)

  1. internal/etag/etag_test.go

    		tag, err := Parse(test.ETag)
    		if err != nil {
    			t.Fatalf("Test %d: failed to parse ETag: %v", i, err)
    		}
    		if isEncrypted := tag.IsEncrypted(); isEncrypted != test.IsEncrypted {
    			t.Fatalf("Test %d: got '%v' - want '%v'", i, isEncrypted, test.IsEncrypted)
    		}
    	}
    }
    
    var formatTests = []struct {
    	ETag    string
    	AWSETag string
    }{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  2. internal/crypto/metadata.go

    		return true
    	}
    	return false
    }
    
    // IsEncrypted returns true if the object metadata indicates
    // that it was uploaded using some form of server-side-encryption.
    //
    // IsEncrypted only checks whether the metadata contains at least
    // one entry indicating SSE-C or SSE-S3.
    func IsEncrypted(metadata map[string]string) (Type, bool) {
    	if S3KMS.IsEncrypted(metadata) {
    		return S3KMS, true
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 17:40:33 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  3. cmd/encryption-v1.go

    		SSES3SinglePartObjects := make(map[int]bool)
    		for i, object := range batch {
    			if kind, ok := crypto.IsEncrypted(object.UserDefined); ok && kind == crypto.S3 && !crypto.IsMultiPart(object.UserDefined) {
    				ETag, err := etag.Parse(object.ETag)
    				if err != nil {
    					continue
    				}
    				if ETag.IsEncrypted() {
    					SSES3SinglePartObjects[i] = true
    					metadata = append(metadata, object.UserDefined)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Oct 13 13:06:08 UTC 2024
    - 37.2K bytes
    - Viewed (0)
  4. internal/crypto/metadata_test.go

    }
    
    func TestIsEncrypted(t *testing.T) {
    	for i, test := range isEncryptedTests {
    		if _, isEncrypted := IsEncrypted(test.Metadata); isEncrypted != test.Encrypted {
    			t.Errorf("Test %d: got '%v' - want '%v'", i, isEncrypted, test.Encrypted)
    		}
    	}
    }
    
    var s3IsEncryptedTests = []struct {
    	Metadata  map[string]string
    	Encrypted bool
    }{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  5. internal/etag/etag.go

    	}
    	return hex.EncodeToString(e)
    }
    
    // IsEncrypted reports whether the ETag is encrypted.
    func (e ETag) IsEncrypted() bool {
    	// An encrypted ETag must be at least 32 bytes long.
    	// It contains the encrypted ETag value + an authentication
    	// code generated by the AEAD cipher.
    	//
    	// Here is an incorrect implementation of IsEncrypted:
    	//
    	//   return len(e) > 16 && !bytes.ContainsRune(e, '-')
    	//
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Mar 10 21:09:36 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. cmd/object-multipart-handlers.go

    	}
    
    	pReader := NewPutObjReader(hashReader)
    
    	_, isEncrypted := crypto.IsEncrypted(mi.UserDefined)
    	_, replicationStatus := mi.UserDefined[xhttp.AmzBucketReplicationStatus]
    	_, sourceReplReq := r.Header[xhttp.MinIOSourceReplicationRequest]
    	var objectEncryptionKey crypto.ObjectKey
    	if isEncrypted {
    		if !crypto.SSEC.IsRequested(r.Header) && crypto.SSEC.IsEncrypted(mi.UserDefined) && !replicationStatus {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Aug 31 18:25:48 UTC 2024
    - 39.2K bytes
    - Viewed (0)
  7. internal/crypto/sse-c.go

    		return true
    	}
    	if _, ok := h[xhttp.AmzServerSideEncryptionCustomerKeyMD5]; ok {
    		return true
    	}
    	return false
    }
    
    // IsEncrypted returns true if the metadata contains an SSE-C
    // entry indicating that the object has been encrypted using
    // SSE-C.
    func (ssec) IsEncrypted(metadata map[string]string) bool {
    	if _, ok := metadata[MetaSealedKeySSEC]; ok {
    		return true
    	}
    	return false
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. cmd/object-api-utils.go

    		}
    	}
    	partSkip = offset - skipLength
    
    	// Load index and skip more if feasible.
    	if partSkip > 0 && len(oi.Parts) > firstPartIdx && len(oi.Parts[firstPartIdx].Index) > 0 {
    		_, isEncrypted := crypto.IsEncrypted(oi.UserDefined)
    		if isEncrypted {
    			dec, err := decrypt(oi.Parts[firstPartIdx].Index)
    			if err == nil {
    				// Load Index
    				var idx s2.Index
    				_, err := idx.Load(s2.RestoreIndexHeaders(dec))
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 08 15:29:58 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  9. cmd/batch-rotate.go

    	srcBucket := r.Bucket
    	srcObject := objInfo.Name
    
    	if objInfo.DeleteMarker || !objInfo.VersionPurgeStatus.Empty() {
    		return nil
    	}
    	sseKMS := crypto.S3KMS.IsEncrypted(objInfo.UserDefined)
    	sseS3 := crypto.S3.IsEncrypted(objInfo.UserDefined)
    	if !sseKMS && !sseS3 { // neither sse-s3 nor sse-kms disallowed
    		return errInvalidEncryptionParameters
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Sep 18 17:59:03 UTC 2024
    - 14.7K bytes
    - Viewed (0)
  10. internal/crypto/sse-s3.go

    	if h.Get(xhttp.AmzServerSideEncryption) != xhttp.AmzEncryptionAES {
    		return ErrInvalidEncryptionMethod
    	}
    	return nil
    }
    
    // IsEncrypted returns true if the object metadata indicates
    // that the object was uploaded using SSE-S3.
    func (sses3) IsEncrypted(metadata map[string]string) bool {
    	if _, ok := metadata[MetaSealedKeyS3]; ok {
    		return true
    	}
    	return false
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top