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

Function SSECopy

pkg/encrypt/server-side.go:143–151  ·  pkg/encrypt/server-side.go::SSECopy

SSECopy transforms a SSE-C encryption into a SSE-C copy encryption. This is required for SSE-C key rotation or a SSE-C copy where the source and the destination should be encrypted. If the provided sse is no SSE-C encryption SSECopy returns sse unmodified.

(sse ServerSide)

Source from the content-addressed store, hash-verified

141// If the provided sse is no SSE-C encryption SSECopy returns
142// sse unmodified.
143func SSECopy(sse ServerSide) ServerSide {
144 if sse == nil || sse.Type() != SSEC {
145 return sse
146 }
147 if sse, ok := sse.(ssec); ok {
148 return ssecCopy(sse)
149 }
150 return sse
151}
152
153type ssec [32]byte
154

Calls 2

ssecCopyTypeAlias · 0.85
TypeMethod · 0.65

Tested by

no test coverage detected