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)
| 141 | // If the provided sse is no SSE-C encryption SSECopy returns |
| 142 | // sse unmodified. |
| 143 | func 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 | |
| 153 | type ssec [32]byte |
| 154 |
no test coverage detected