AgoraEncryptionConfig Class Reference
Inherits from | NSObject |
---|---|
Declared in | AgoraObjects.h |
encryptionMode
Encryption mode. The default encryption mode is AgoraEncryptionModeAES128GCM2
. See AgoraEncryptionMode.
@property (assign, nonatomic) AgoraEncryptionMode encryptionMode
Declared In
AgoraObjects.h
encryptionKey
Encryption key in string type with unlimited length. Agora recommends using a 32-byte key.
@property (copy, nonatomic) NSString *encryptionKey
Discussion
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
).
Declared In
AgoraObjects.h
encryptionKdfSalt
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.
Note: This parameter is only valid when you set the encryption mode
as AgoraEncryptionModeAES128GCM2
or
AgoraEncryptionModeAES256GCM2
. In this case, ensure that this
parameter is not nil
or 0
, and the data length is
32 bytes.
@property (strong, nonatomic) NSData *encryptionKdfSalt
Declared In
AgoraObjects.h