Agora C++ API Reference for All Platforms
agora::rtc::EncryptionConfig Struct Reference

#include <IAgoraRtcEngine.h>

Public Member Functions

 EncryptionConfig ()

Public Attributes

ENCRYPTION_MODE encryptionMode
const char * encryptionKey
uint8_t encryptionKdfSalt [32]

Detailed Description

Configurations of built-in encryption schemas.

Constructor & Destructor Documentation

◆ EncryptionConfig()

agora::rtc::EncryptionConfig::EncryptionConfig ( )

Member Data Documentation

◆ encryptionMode

ENCRYPTION_MODE agora::rtc::EncryptionConfig::encryptionMode

Encryption mode. The default encryption mode is AES_128_GCM2. See ENCRYPTION_MODE.

◆ encryptionKey

const char* agora::rtc::EncryptionConfig::encryptionKey

Encryption key in string type with unlimited length. Agora recommends using a 32-byte key.

If you do not set an encryption key or set it as NULL, you cannot use the built-in encryption, and the SDK returns ERR_INVALID_ARGUMENT (-2).

◆ encryptionKdfSalt

uint8_t agora::rtc::EncryptionConfig::encryptionKdfSalt[32]

The salt with the length of 32 bytes. Agora recommends using OpenSSL to generate the salt on your server. For details, see Media Stream Encryption.

This parameter is only valid when you set the encryption mode as AES_128_GCM2 or AES_256_GCM2. In this case, ensure that this parameter is not 0.