语言

Cipher.GetMaxAllowedKeyLength(String) 方法

定义

根据安装的 JCE 管辖策略文件返回指定转换的最大密钥长度。

[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

参数

transformation
String

密码转换。

返回

位或 Integer.MAX_VALUE 的最大密钥长度。

特性

例外

如果找不到指定 提供程序,则为

如果为 .,则为transformationnull

注解

根据安装的 JCE 管辖策略文件返回指定转换的最大密钥长度。 如果安装了 JCE 无限强度管辖策略文件,则返回 Integer.MAX_VALUE。 有关 JCE 管辖策略文件中默认密钥大小的详细信息,请参阅Java加密体系结构参考指南中的附录 E。

在 1.5 中添加。

Java文档javax.crypto.Cipher.getMaxAllowedKeyLength(java.lang.String)。

本页的某些部分是根据 Android 开放源代码项目创建和共享的工作进行的修改,并根据 Creative Commons 2.5 属性许可证中所述的术语使用。

适用于