Server Gateway SDK v3.7.200.21 for Linux Java
Public Member Functions | List of all members
io.agora.rtc.EncryptionConfig Class Reference

Public Member Functions

 EncryptionConfig ()
 EncryptionConfig (int encryptionMode, java.lang.String encryptionKey, byte[] encryptionKdfSalt)
int getEncryptionMode ()
void setEncryptionMode (int encryptionMode)
java.lang.String getEncryptionKey ()
void setEncryptionKey (java.lang.String encryptionKey)
byte[] getEncryptionKdfSalt ()
void setEncryptionKdfSalt (byte[] encryptionKdfSalt)

Detailed Description

The EncryptionConfig class.

Constructor & Destructor Documentation

◆ EncryptionConfig() [1/2]

io.agora.rtc.EncryptionConfig.EncryptionConfig ( )

◆ EncryptionConfig() [2/2]

io.agora.rtc.EncryptionConfig.EncryptionConfig ( int  encryptionMode,
java.lang.String  encryptionKey,
byte[]  encryptionKdfSalt 


encryptionModeEncryption mode. The default encryption mode is ENCRYPTION_MODE_AES_128_GCM2.
  • ENCRYPTION_MODE_AES_128_XTS(1): 128-bit AES encryption, XTS mode.
  • ENCRYPTION_MODE_AES_128_ECB(2): 128-bit AES encryption, ECB mode.
  • ENCRYPTION_MODE_AES_256_XTS(3): 256-bit AES encryption, XTS mode.
  • ENCRYPTION_MODE_SM4_128_ECB(4): 128-bit SM4 encryption, ECB mode.
  • ENCRYPTION_MODE_AES_128_GCM(5): 128-bit AES encryption, GCM mode.
  • ENCRYPTION_MODE_AES_256_GCM(6): 256-bit AES encryption, GCM mode.
  • ENCRYPTION_MODE_AES_128_GCM2(7): (Default) 128-bit AES encryption, GCM mode, with KDF salt.
  • ENCRYPTION_MODE_AES_256_GCM2(8): 256-bit AES encryption, GCM mode, with KDF salt.
encryptionKeyEncryption key in string type with unlimited length. Agora recommends using a 32-byte key.
encryptionKdfSaltThe salt with the length of 32 bytes. Agora recommends using OpenSSL to generate the salt on your server. This parameter is only valid when you set the encryption mode as AES_128_GCM2 or AES_256_GCM2. In this case, ensure that this parameter is not 0.

Member Function Documentation

◆ getEncryptionKdfSalt()

byte[] io.agora.rtc.EncryptionConfig.getEncryptionKdfSalt ( )

◆ getEncryptionKey()

java.lang.String io.agora.rtc.EncryptionConfig.getEncryptionKey ( )

◆ getEncryptionMode()

int io.agora.rtc.EncryptionConfig.getEncryptionMode ( )

◆ setEncryptionKdfSalt()

void io.agora.rtc.EncryptionConfig.setEncryptionKdfSalt ( byte[]  encryptionKdfSalt)

◆ setEncryptionKey()

void io.agora.rtc.EncryptionConfig.setEncryptionKey ( java.lang.String  encryptionKey)

◆ setEncryptionMode()

void io.agora.rtc.EncryptionConfig.setEncryptionMode ( int  encryptionMode)

The documentation for this class was generated from the following file: