enableEncryption abstract method
Enables or disables the built-in encryption.
In scenarios requiring high security, Agora recommends calling this method to enable the built-in encryption before joining a channel. 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. If you enable the built-in encryption, you cannot use the Media Push function.
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> enableEncryption(
{required bool enabled, required EncryptionConfig config});