Android Guides | Samples

Javax.Crypto.Cipher.GetInstance Method

Creates a new cipher for the specified transformation provided by the specified provider.

Syntax

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

Parameters

transformation
the name of the transformation to create a cipher for.
provider
the name of 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.
NoSuchProviderExceptionif no provider with the specified name can be found.
NoSuchPaddingExceptionif the requested padding scheme in the transformation is not available.
IllegalArgumentExceptionif the specified provider is null.

Remarks

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