Help Center/ Object Storage Service/ SDK Reference/ C/ Data Types/ server_side_encryption_params
Updated on 2026-08-03 GMT+08:00

server_side_encryption_params

Table 1 server_side_encryption_params

Parameter

Type

Mandatory (Yes/No)

Description

encryption_type

obs_encryption_type

No

Explanation:

Encryption type.

Restrictions:

None

Value range:

None

Default value:

None

kms_server_side_encryption

char *

No

Explanation:

Indicates that SSE-KMS is used for server-side encryption.

Restrictions:

None

Value range:

  • kms
  • AES256

kms_key_id

char *

No

Explanation:

Key ID. If the SSE-KMS encryption is used with a specified key, the key ID is required.

Restrictions:

This header can only be used when you specify kms for the kms_server_side_encryption header.

Default value:

If you specify kms for encryption but do not specify a key ID, the default master key will be used. If there is not a default master key, OBS will create one and use it.

ssec_customer_algorithm

char *

No

Explanation:

Indicates the algorithm used to encrypt an object.

Restrictions:

The header is used only in SSE-C mode.

Value range:

AES256 (AES256 encryption algorithm)

Default value:

None

ssec_customer_key

char *

No

Explanation:

Indicates the key used to encrypt an object.

Restrictions:

The header is used only in SSE-C mode.

Value range:

Base64-encoded 256-bit key

Default value:

None

des_ssec_customer_algorithm

char *

No

Explanation:

Indicates the algorithm used to decrypt a source object.

Restrictions:

The header is used only in SSE-C mode.

Value range:

None

Default value:

None

des_ssec_customer_key

char *

No

Explanation:

Indicates the key used to decrypt the source object.

Restrictions:

The header is used only in SSE-C mode.

Value range:

None

Default value:

None

Table 2 obs_encryption_type

Constant

Original Value

Description

OBS_ENCRYPTION_KMS

kms

Use the KMS encryption.

OBS_ENCRYPTION_SSEC

AES256

Use the SSE-C encryption.