Android Guides | Samples

Javax.Crypto.Cipher.GetInstance Method

Creates a new cipher for the specified transformation.

Syntax

[Android.Runtime.Register("getInstance", "(Ljava/lang/String;Ljava/security/Provider;)Ljavax/crypto/Cipher;", "")]
public static Cipher GetInstance (String transformation, Provider provider)

Parameters

transformation
the name of the transformation to create a cipher for.
provider
the provider to ask for the transformation.

Exceptions

TypeReason
NoSuchAlgorithmExceptionif the specified provider can not provide the transformation, or it is null, empty or in an invalid format.
NoSuchPaddingExceptionif the requested padding scheme in the transformation is not available.
IllegalArgumentExceptionif the provider is null.

Remarks

Creates a new cipher for the specified transformation. 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