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

Function NewSSEC

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

NewSSEC returns a new server-side-encryption using SSE-C and the provided key. The key must be 32 bytes long.

(key []byte)

Source from the content-addressed store, hash-verified

111// NewSSEC returns a new server-side-encryption using SSE-C and the provided key.
112// The key must be 32 bytes long.
113func NewSSEC(key []byte) (ServerSide, error) {
114 if len(key) != 32 {
115 return nil, errors.New("encrypt: SSE-C key must be 256 bit long")
116 }
117 sse := ssec{}
118 copy(sse[:], key)
119 return sse, nil
120}
121
122// SSE transforms a SSE-C copy encryption into a SSE-C encryption.
123// It is the inverse of SSECopy(...).

Callers 2

mainFunction · 0.92

Calls

no outgoing calls

Tested by 1