Share via


Cipher.GetMaxAllowedKeyLength(String) Method

Definition

Returns the maximum key length for the specified transformation according to the installed JCE jurisdiction policy files.

[Android.Runtime.Register("getMaxAllowedKeyLength", "(Ljava/lang/String;)I", "")]
public static int GetMaxAllowedKeyLength (string? transformation);
[<Android.Runtime.Register("getMaxAllowedKeyLength", "(Ljava/lang/String;)I", "")>]
static member GetMaxAllowedKeyLength : string -> int

Parameters

transformation
String

the cipher transformation.

Returns

the maximum key length in bits or Integer.MAX_VALUE.

Attributes

Exceptions

if no provider for the specified transformation can be found.

if transformation is null.

Remarks

Returns the maximum key length for the specified transformation according to the installed JCE jurisdiction policy files. If JCE unlimited strength jurisdiction policy files are installed, Integer.MAX_VALUE will be returned. For more information on default key size in JCE jurisdiction policy files, please see Appendix E in the Java Cryptography Architecture Reference Guide.

Added in 1.5.

Java documentation for javax.crypto.Cipher.getMaxAllowedKeyLength(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