setEncryptInfo method

FutureOr<int> setEncryptInfo(
  1. int aesType,
  2. String key
)

@detail api @author wangjunlin.3182 @brief Sets the way to use built-in encryption when transmitting. @param aesType Encryption type. Optional parameters are 0, 1, 2, 3, and 4. The meaning is as follows:
0. Not encrypted.
1. AES-128-CBC
2. AES-256-CBC
3. AES-128-ECB
4. AES-256-ECB @param key Encryption key. The length is limited to 36 bits, and the excess will be truncated @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - This method is mutually exclusive with setCustomizeEncryptHandler{@link #RTCEngine#setCustomizeEncryptHandler}, that is, according to the order of invocation, the last method called is the final version that takes effect. - This method must be called before calling joinRoom{@link #RTCRoom#joinRoom}. It can be called repeatedly, with the last called parameter as the effective parameter - AES encryption algorithm limit, more than 36 bits of key will be truncated, only the first 36 bits

Implementation

FutureOr<int> setEncryptInfo(int aesType, String key) async {
  return await nativeCall('setEncryptInfo', [aesType, key]);
}