enableEncryptionEx abstract method
Future<void>
enableEncryptionEx({
- required RtcConnection connection,
- required bool enabled,
- required EncryptionConfig config,
Enables or disables the built-in encryption.
All users in the same channel must use the same encryption mode and encryption key. After the user leaves the channel, the SDK automatically disables the built-in encryption. To enable the built-in encryption, call this method before the user joins the channel again. In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel.
connection
The connection information. See RtcConnection.enabled
Whether to enable built-in encryption: true : Enable the built-in encryption. false : (Default) Disable the built-in encryption.config
Built-in encryption configurations. See EncryptionConfig.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.
Implementation
Future<void> enableEncryptionEx(
{required RtcConnection connection,
required bool enabled,
required EncryptionConfig config});