Language

KeyChain.IsKeyAlgorithmSupported(String) Method

Definition

Returns true if the current device's KeyChain supports a specific PrivateKey type indicated by algorithm (e.

[Android.Runtime.Register("isKeyAlgorithmSupported", "(Ljava/lang/String;)Z", "")]
public static bool IsKeyAlgorithmSupported(string algorithm);
[<Android.Runtime.Register("isKeyAlgorithmSupported", "(Ljava/lang/String;)Z", "")>]
static member IsKeyAlgorithmSupported : string -> bool

Parameters

algorithm
String

The key algorithm name to test, such as RSA or EC. A null value returns false on Android 4.3 (API 18) and throws NullPointerException on Android 4.4 (API 19) through Android 17 (API 37).

Returns

true if the algorithm name is in the Android version's supported list; otherwise, false for a non-null name. This does not check whether an individual key is hardware-backed.

Attributes

Remarks

Returns true if the current device's KeyChain supports a specific PrivateKey type indicated by algorithm (e.g., "RSA").

Java documentation for android.security.KeyChain.isKeyAlgorithmSupported(java.lang.String).

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