KeyStore.GetKey(String, Char[]) 方法

定义

返回与给定别名关联的密钥,使用给定的密码进行恢复。

[Android.Runtime.Register("getKey", "(Ljava/lang/String;[C)Ljava/security/Key;", "")]
public Java.Security.IKey? GetKey(string? alias, char[]? password);
[<Android.Runtime.Register("getKey", "(Ljava/lang/String;[C)Ljava/security/Key;", "")>]
member this.GetKey : string * char[] -> Java.Security.IKey

参数

alias
String

别名

password
Char[]

用于恢复密钥的密码

返回

请求的密钥;如果给定的别名不存在或未标识与密钥相关的条目,则为 null。

属性

例外

如果未初始化,则为 /;。

如果用于恢复密钥的算法不可用,

如果无法恢复密钥,则为

注解

返回与给定别名关联的密钥,使用给定的密码进行恢复。 密钥必须通过调用或 setKeyEntry调用或调用 setEntryPrivateKeyEntrySecretKeyEntry来关联别名。

Java文档java.security.KeyStore.getKey(java.lang.String, char[])

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于