Android Guides | Samples

Javax.Crypto.SecretKeyFactory.GetInstance Method

Creates a new SecretKeyFactory instance for the specified key algorithm from the specified provider.

Syntax

[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/SecretKeyFactory;", "")]
public static SecretKeyFactory GetInstance (String algorithm, String provider)

Parameters

algorithm
the name of the key algorithm.
provider
the name of the provider that provides the requested algorithm.

Exceptions

TypeReason
NoSuchAlgorithmExceptionif the specified provider cannot provide the requested algorithm.
NoSuchProviderExceptionif the specified provider does not exist.
IllegalArgumentExceptionif the specified provider name is null or empty.

Remarks

Creates a new SecretKeyFactory instance for the specified key algorithm from the specified provider.

[Android Documentation]

Requirements

Namespace: Javax.Crypto
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1