EncryptionConfig
Configures the built-in encryption mode and key.
export class EncryptionConfig {
encryptionMode?: EncryptionMode;
encryptionKey?: string;
encryptionKdfSalt?: number[];
datastreamEncryptionEnabled?: boolean;
}
Properties
- encryptionMode
- Built-in encryption mode. See EncryptionMode. It is recommended to use
Aes128Gcm2orAes256Gcm2encryption modes. These modes support salt and offer higher security. - encryptionKey
- Built-in encryption key of type string with no length limit. A 32-byte key is recommended.
Note: If this parameter is not specified or set to null, built-in encryption cannot be enabled and the SDK returns error code
-2. - encryptionKdfSalt
- Salt with a length of 32 bytes. It is recommended to generate the salt on the server using OpenSSL.
Note: This parameter is effective only in
Aes128Gcm2orAes256Gcm2encryption modes. In this case, ensure the value of this parameter is not all0. - datastreamEncryptionEnabled
- Whether to enable data stream encryption:
- true: Enable data stream encryption.
- false: (Default) Disable data stream encryption.