(Optional) Configuring the Login Information Encryption Algorithm

API Function

This API is used to configure the encryption algorithm type for sensitive information before device connection. The service can select an appropriate encryption algorithm type based on the security level.

API Description

public static boolean setAlgType (int type);

Class

BaseService

Parameter Description

Parameter

Mandatory or Optional

Type

Description

type

Mandatory

int

Type of the encryption algorithm. The value ranges from 0 to 2.

  • 0: AES 256 CBC
  • 1: AES 128 GCM
  • 2: AES 256 GCM

Return Value

Return Value

Description

true

Success

false

Failure

Example

Select an encryption algorithm type.

1
2
3
private void configAlgPara() { 
    BaseService. setAlgType (2); 
}