Help Center> IoT Device Access> SDK Reference> Old SDKs> AgentLite API Reference (Java)> Access of Directly Connected Devices> (Optional) Configuring the Login Information Encryption Algorithm

(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

1
public static boolean setAlgType (int type);

Class

BaseService

Parameter Description

Parameter

Mandatory or Optional

Type

Description

type

Mandatory

int

Encryption algorithm type.

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

Return Value

Return Value

Description

true

Success

false

Failure

Example

1
2
3
4
// Select an encryption algorithm type.
private void configAlgPara() {
    BaseService. setAlgType (2);
}