Udostępnij za pośrednictwem


KeyPairGeneratorSpec.IsEncryptionRequired Property

Definition

Returns true if the key must be encrypted at rest.

public bool IsEncryptionRequired { [Android.Runtime.Register("isEncryptionRequired", "()Z", "")] get; }
[<get: Android.Runtime.Register("isEncryptionRequired", "()Z", "")>]
member this.IsEncryptionRequired : bool

Property Value

Attributes

Remarks

Returns true if the key must be encrypted at rest. This will protect the key pair with the secure lock screen credential (e.g., password, PIN, or pattern).

Note that encrypting the key at rest requires that the secure lock screen (e.g., password, PIN, pattern) is set up, otherwise key generation will fail. Moreover, this key will be deleted when the secure lock screen is disabled or reset (e.g., by the user or a Device Administrator). Finally, this key cannot be used until the user unlocks the secure lock screen after boot.

This member is deprecated. Encryption at rest is on by default. If extra binding to the lockscreen screen credential is desired use KeyGenParameterSpec.Builder#setUserAuthenticationRequired(boolean). This flag will be ignored from Android S.

Java documentation for android.security.KeyPairGeneratorSpec.isEncryptionRequired().

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

See also