KeyGenParameterSpec.Builder.SetInvalidatedByBiometricEnrollment Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets whether this key should be invalidated on biometric enrollment.
[Android.Runtime.Register("setInvalidatedByBiometricEnrollment", "(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=24)]
public Android.Security.Keystore.KeyGenParameterSpec.Builder SetInvalidatedByBiometricEnrollment(bool invalidateKey);
[<Android.Runtime.Register("setInvalidatedByBiometricEnrollment", "(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=24)>]
member this.SetInvalidatedByBiometricEnrollment : bool -> Android.Security.Keystore.KeyGenParameterSpec.Builder
Parameters
- invalidateKey
- Boolean
Returns
- Attributes
Remarks
Sets whether this key should be invalidated on biometric enrollment. This applies only to keys which require user authentication (see setUserAuthenticationRequired(boolean)) and if no positive validity duration has been set (see setUserAuthenticationValidityDurationSeconds(int)), meaning the key is valid for biometric authentication only.
By default, invalidateKey is true, so keys that are valid for biometric authentication only are irreversibly invalidated when a new biometric is enrolled, or when all existing biometrics are deleted. That may be changed by calling this method with invalidateKey set to false.
Invalidating keys on enrollment of a new biometric or unenrollment of all biometrics improves security by ensuring that an unauthorized person who obtains the password can't gain the use of biometric-authenticated keys by enrolling their own biometric. However, invalidating keys makes key-dependent operations impossible, requiring some fallback procedure to authenticate the user and set up a new key.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.