public static enum BiometricAuthentication.SecureLevel extends Enum<BiometricAuthentication.SecureLevel>
Currently, biometric authentication provides 3D facial authentication (the highest security level supported
is S3) and 2D facial authentication (the highest security level supported is S2). S4 is not supported in the
current version. Applications can choose the appropriate security level based on the security requirements for
the data to access. If the authentication security capability of the device is higher than or equal to the
security level required by the application, biometric authentication is supported; if the authentication security
capability of the device is lower than the security level required by the application, biometric authentication
is not supported. This enumeration is used as a parameter in
BiometricAuthentication.checkAuthenticationAvailability(ohos.biometrics.authentication.BiometricAuthentication.AuthType,ohos.biometrics.authentication.BiometricAuthentication.SecureLevel,boolean) and
BiometricAuthentication.execAuthenticationAction(ohos.biometrics.authentication.BiometricAuthentication.AuthType,ohos.biometrics.authentication.BiometricAuthentication.SecureLevel,boolean,boolean,ohos.biometrics.authentication.BiometricAuthentication.SystemAuthDialogInfo).
| 枚举常量 | 说明 |
|---|---|
SECURE_LEVEL_S1 |
Indicates the low security level.
|
SECURE_LEVEL_S2 |
Indicates the medium security level.
|
SECURE_LEVEL_S3 |
Indicates the high security level.
|
SECURE_LEVEL_S4 |
Indicates the highest security level.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
static BiometricAuthentication.SecureLevel |
valueOf(String name) |
返回带有指定名称的该类型的枚举常量。
字符串必须与用于声明该类型的枚举常量的
标识符完全匹配。(不允许有多余
的空格字符。)
|
static BiometricAuthentication.SecureLevel[] |
values() |
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。该方法可用于迭代
常量, 如下所示:
for (BiometricAuthentication.SecureLevel c : BiometricAuthentication.SecureLevel.values()) System.out.println(c); |
public static final BiometricAuthentication.SecureLevel SECURE_LEVEL_S1
public static final BiometricAuthentication.SecureLevel SECURE_LEVEL_S2
public static final BiometricAuthentication.SecureLevel SECURE_LEVEL_S3
public static final BiometricAuthentication.SecureLevel SECURE_LEVEL_S4
public static BiometricAuthentication.SecureLevel[] values()
for (BiometricAuthentication.SecureLevel c : BiometricAuthentication.SecureLevel.values()) System.out.println(c);
public static BiometricAuthentication.SecureLevel valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值