Agora Java API Reference for Android

Public Attributes | List of all members
agora::rtc::EncryptionConfig Struct Reference

`#include <AgoraBase.h>`

## Public Attributes
ENCRYPTION_MODE | encryptionMode
const char * | encryptionKey
uint8_t | encryptionKdfSalt [32]
bool | datastreamEncryptionEnabled

## Detailed Description

Built-in encryption configurations.

## Member Data Documentation

## ◆ encryptionMode

ENCRYPTION_MODE agora::rtc::EncryptionConfig::encryptionMode

The built-in encryption mode. See #ENCRYPTION_MODE. Agora recommends using `AES_128_GCM2` or `AES_256_GCM2` encrypted mode. These two modes support the use of salt for higher security.

## ◆ encryptionKey

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

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

Note
  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]

Salt, 32 bytes in length. Agora recommends that you use OpenSSL to generate salt on the server side.

Note
  This parameter takes effect only in `AES_128_GCM2` or `AES_256_GCM2` encrypted mode. In this case, ensure that this parameter is not 0.