Updated on 2022-02-24 GMT+08:00

(Optional) Configuring Encryption Algorithm Type Parameters

API Function

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

API Description

1
HW_UINT HW_SetAlgType(HW_UINT uiAlgType);

Parameter Description

Parameter

Mandatory or Optional

Type

Description

uiAlgType

Mandatory

Int

Specifies the encryption algorithm type. The value ranges from 0 to 2.

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

Return Value

For details, see 4.2 Function Return Values.

Example

//Developers call this API to configure parameters.
HW_SetAlgType(2);