IdentityCredential.SetAvailableAuthenticationKeys Method

Definition

Overloads

SetAvailableAuthenticationKeys(Int32, Int32)

Sets the number of dynamic authentication keys the IdentityCredential will maintain, and the number of times each should be used.

SetAvailableAuthenticationKeys(Int32, Int32, Int64)

Sets the number of dynamic authentication keys the IdentityCredential will maintain, the number of times each should be used, and the minimum amount of time it's valid for.

SetAvailableAuthenticationKeys(Int32, Int32)

Sets the number of dynamic authentication keys the IdentityCredential will maintain, and the number of times each should be used.

[Android.Runtime.Register("setAvailableAuthenticationKeys", "(II)V", "GetSetAvailableAuthenticationKeys_IIHandler", ApiSince=30)]
public abstract void SetAvailableAuthenticationKeys (int keyCount, int maxUsesPerKey);
[<Android.Runtime.Register("setAvailableAuthenticationKeys", "(II)V", "GetSetAvailableAuthenticationKeys_IIHandler", ApiSince=30)>]
abstract member SetAvailableAuthenticationKeys : int * int -> unit

Parameters

keyCount
Int32

The number of active, certified dynamic authentication keys the IdentityCredential will try to keep available. This value must be non-negative.

maxUsesPerKey
Int32

The maximum number of times each of the keys will be used before it's eligible for replacement. This value must be greater than zero.

Attributes

Remarks

Sets the number of dynamic authentication keys the IdentityCredential will maintain, and the number of times each should be used.

The Identity Credential system will select the least-used dynamic authentication key each time #getEntries(byte[], Map, byte[], byte[]) is called. Identity Credentials for which this method has not been called behave as though it had been called wit keyCount 0 and maxUsesPerKey 1.

The effect of this method is like calling #setAvailableAuthenticationKeys(int, int, long) with the last parameter is set to 0.

This member is deprecated. Use #setAvailableAuthenticationKeys(int, int, long) instead.

Java documentation for android.security.identity.IdentityCredential.setAvailableAuthenticationKeys(int, int).

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

SetAvailableAuthenticationKeys(Int32, Int32, Int64)

Sets the number of dynamic authentication keys the IdentityCredential will maintain, the number of times each should be used, and the minimum amount of time it's valid for.

[Android.Runtime.Register("setAvailableAuthenticationKeys", "(IIJ)V", "GetSetAvailableAuthenticationKeys_IIJHandler", ApiSince=34)]
public virtual void SetAvailableAuthenticationKeys (int keyCount, int maxUsesPerKey, long minValidTimeMillis);
[<Android.Runtime.Register("setAvailableAuthenticationKeys", "(IIJ)V", "GetSetAvailableAuthenticationKeys_IIJHandler", ApiSince=34)>]
abstract member SetAvailableAuthenticationKeys : int * int * int64 -> unit
override this.SetAvailableAuthenticationKeys : int * int * int64 -> unit

Parameters

keyCount
Int32

The number of active, certified dynamic authentication keys the IdentityCredential will try to keep available. This value must be non-negative.

maxUsesPerKey
Int32

The maximum number of times each of the keys will be used before it's eligible for replacement. This value must be greater than zero.

minValidTimeMillis
Int64

If a key has less time left than this value it will be eliglible for replacement. This value must be non-negative.

Attributes

Remarks

Sets the number of dynamic authentication keys the IdentityCredential will maintain, the number of times each should be used, and the minimum amount of time it's valid for.

The Identity Credential system will select the least-used dynamic authentication key each time #getEntries(byte[], Map, byte[], byte[]) is called. Identity Credentials for which this method has not been called behave as though it had been called wit keyCount 0, maxUsesPerKey 1, and minValidTimeMillis 0.

Applications can use #getAuthenticationKeyMetadata() to get a picture of the usage andtime left of each configured authentication key. This can be used to determine how urgent it is recertify new authentication keys via the #getAuthKeysNeedingCertification() method.

Java documentation for android.security.identity.IdentityCredential.setAvailableAuthenticationKeys(int, int, long).

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