EncryptionConfig
Configure built-in encryption mode and key.
public class EncryptionConfig
{
public ENCRYPTION_MODE encryptionMode;
public string encryptionKey;
public byte[] encryptionKdfSalt;
public bool datastreamEncryptionEnabled;
}
Properties
- encryptionMode
- Built-in encryption mode. See ENCRYPTION_MODE. It is recommended to use
AES_128_GCM2orAES_256_GCM2modes, which support salt and offer higher security. - encryptionKey
- Built-in encryption key, string type, no length limit. It is recommended to use a 32-byte key.
Note: If this parameter is not specified or is set to
NULL, built-in encryption cannot be enabled and the SDK returns error code-2. - encryptionKdfSalt
- Salt, 32 bytes in length. It is recommended to generate the salt on the server using OpenSSL.
Note: This parameter takes effect only when using
AES_128_GCM2orAES_256_GCM2encryption modes. In this case, ensure the value of this parameter is not all0. - datastreamEncryptionEnabled
- Whether to enable data stream encryption:
- true: Enable data stream encryption.
- false: (default) Disable data stream encryption.