setEncryptionSecret method

  1. @override
  2. @deprecated
Future<void> setEncryptionSecret(
  1. String secret
)

Enables built-in encryption with an encryption password before joining a channel.

Deprecated

This method is deprecated. Use RtcEngine.enableEncryption instead.

All users in a channel must set the same encryption password. The encryption password is automatically cleared once a user leaves the channel. If the encryption password is not specified or set to empty, the encryption functionality is disabled.

Note

  • For optimal transmission, ensure that the encrypted data size does not exceed the original data size + 16 bytes. 16 bytes is the maximum padding size for AES encryption.
  • Do not use this method for CDN live streaming.

Parameter secret The encryption password.

Implementation

@override
@deprecated
Future<void> setEncryptionSecret(String secret) {
  return _invokeMethod('setEncryptionSecret', {'secret': secret});
}