Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EncryptionConfig

Definition of EncryptionConfig.

since

v3.1.2.

Hierarchy

  • EncryptionConfig

Index

Constructors

constructor

  • new EncryptionConfig(params?: undefined | { encryptionKdfSalt?: number[]; encryptionKey?: undefined | string; encryptionMode?: EncryptionMode }): EncryptionConfig
  • Parameters

    • Optional params: undefined | { encryptionKdfSalt?: number[]; encryptionKey?: undefined | string; encryptionMode?: EncryptionMode }

    Returns EncryptionConfig

Properties

Optional encryptionKdfSalt

encryptionKdfSalt: number[]

The salt with the length of 32 bytes. Agora recommends using OpenSSL to generate the salt on your server. For details, see Media Stream Encryption.

since

v3.4.5

Note: This parameter is only valid when you set the encryption mode as AES128GCM2 or AES256GCM2. Ensure that this parameter meets the following requirements:

  • Android: This parameter is not 0.
  • iOS: This parameter is not nil or 0, and the data length is 32 bytes.

Optional encryptionKey

encryptionKey: undefined | string

Encryption key in string type with unlimited length. Agora recommends using a 32-byte key.

Note

If you do not set an encryption key or set it as null, you cannot use the built-in encryption, and the SDK returns InvalidArgument(2).

Optional encryptionMode

encryptionMode: EncryptionMode

Encryption mode. The default encryption mode is AES128GCM2. See EncryptionMode.

Generated using TypeDoc