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/security/Provider;)Ljavax/crypto/SecretKeyFactory;", "")]
public static SecretKeyFactory GetInstance (String algorithm, Provider provider)

Parameters

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

Exceptions

TypeReason
NoSuchAlgorithmExceptionif the specified provider cannot provider the requested algorithm.
IllegalArgumentExceptionif the specified provider is null.
NullPointerExceptionis the specified algorithm name is null.

Remarks

Creates a new SecretKeyFactory instance for the specified key algorithm from the specified provider. The provider supplied does not have to be registered.

[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