Langue

KeyGenParameterSpec.Builder.SetUserPresenceRequired(Boolean) Method

Definition

Sets whether a test of user presence is required to be performed between the Signature.initSign() and Signature.sign() method calls.

[Android.Runtime.Register("setUserPresenceRequired", "(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=28)]
public Android.Security.Keystore.KeyGenParameterSpec.Builder SetUserPresenceRequired(bool required);
[<Android.Runtime.Register("setUserPresenceRequired", "(Z)Landroid/security/keystore/KeyGenParameterSpec$Builder;", "", ApiSince=28)>]
member this.SetUserPresenceRequired : bool -> Android.Security.Keystore.KeyGenParameterSpec.Builder

Parameters

required
Boolean

Returns

Attributes

Remarks

Sets whether a test of user presence is required to be performed between the Signature.initSign() and Signature.sign() method calls. It requires that the KeyStore implementation have a direct way to validate user presence; for example, a hardware-backed StrongBox can use a button press that is observable in hardware. A test for user presence is tangential to authentication. The test can be part of an authentication step as long as it can be validated by the hardware protecting the key and cannot be spoofed. For example, a physical button press can be used as a test of user presence only if the other pins connected to the button cannot simulate a button press. There must be no way for the primary processor to fake a button press, or that button must not be used as a test of user presence.

Android reference for android.security.keystore.KeyGenParameterSpec.Builder.setUserPresenceRequired.

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.

Applies to