IoT SDK for Linux v1.9.7
Loading...
Searching...
No Matches
crypto_option_t Struct Reference

#include <agora_rtc_api.h>

Data Fields

bool enable
crypto_mode_e mode
char key [128+1]
uint8_t salt [32]

Detailed Description

Encryption option

Field Documentation

◆ enable

bool enable

Whether to enable media-stream encryption:

  • true: Enable encryption.
  • false: Disable encryption.

◆ key

char key[128+1]

The media-stream encryption key. The string can contain up to 128 bytes; a 32-byte key is recommended.

Note
If this parameter is omitted or set to NULL, media-stream encryption cannot be enabled and the SDK returns error code -2.

◆ mode

The media-stream encryption mode. See crypto_mode_e. Agora recommends AES_128_GCM2 or AES_256_GCM2; these modes support a salt and provide stronger security.

◆ salt

uint8_t salt[32]

The 32-byte salt. Agora recommends generating it on your server with OpenSSL. See the Media Stream Encryption documentation.

Note
This parameter takes effect only with AES_128_GCM2 or AES_256_GCM2. Ensure that its value is not all zeros.

The documentation for this struct was generated from the following file: