Agora RTC Objective-C API Reference Refactor

Properties
AgoraEncryptionConfig Class Reference

Inherits <NSObject>.

## Properties
AgoraEncryptionMode | encryptionMode
NSString *_Nullable | encryptionKey

## Detailed Description

Configurations of built-in encryption schemas.

## Property Documentation

## ◆ encryptionMode

- (AgoraEncryptionMode) encryptionMode
| read write nonatomic assign

Encryption mode. The default encryption mode is `AgoraEncryptionModeAES128GCM2`. See AgoraEncryptionMode.

## ◆ encryptionKey

- (NSString* _Nullable) encryptionKey
| read write nonatomic copy

Encryption key in string type.

Note**

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

## ◆ encryptionKdfSalt

- (NSData* _Nullable) encryptionKdfSalt
| read write nonatomic strong

## ◆ datastreamEncryptionEnabled

- (BOOL) datastreamEncryptionEnabled
| read write nonatomic assign