MCPcopy
hub / github.com/minio/minio-go / NewSSEKMS

Function NewSSEKMS

pkg/encrypt/server-side.go:100–109  ·  view source on GitHub ↗

NewSSEKMS returns a new server-side-encryption using SSE-KMS and the provided Key Id and context.

(keyID string, context interface{})

Source from the content-addressed store, hash-verified

98
99// NewSSEKMS returns a new server-side-encryption using SSE-KMS and the provided Key Id and context.
100func NewSSEKMS(keyID string, context interface{}) (ServerSide, error) {
101 if context == nil {
102 return kms{key: keyID, hasContext: false}, nil
103 }
104 serializedContext, err := json.Marshal(context)
105 if err != nil {
106 return nil, err
107 }
108 return kms{key: keyID, context: serializedContext, hasContext: true}, nil
109}
110
111// NewSSEC returns a new server-side-encryption using SSE-C and the provided key.
112// The key must be 32 bytes long.

Callers 2

Test_SSEHeadersFunction · 0.92

Calls 1

MarshalMethod · 0.65

Tested by 2

Test_SSEHeadersFunction · 0.74