java.security.KeyStore,java.security.cert包,和java.security.Principal。
@Deprecated public abstract class Signer extends Identity
一个签名者的私钥的管理是一个重要的和敏感的问题,应处理的子类,适当的他们的预期用途。
Identity,
Serialized Form
| Modifier | Constructor and Description |
|---|---|
protected |
Signer()
过时的。
创建一个签名者。
|
|
Signer(String name)
过时的。
用指定的标识名称创建一个签名者。
|
|
Signer(String name, IdentityScope scope)
过时的。
使用指定的标识名称和范围创建一个签名人。
|
| Modifier and Type | Method and Description |
|---|---|
PrivateKey |
getPrivateKey()
过时的。
返回此签名者的私钥。
|
void |
setKeyPair(KeyPair pair)
过时的。
设置此签名者的密钥对(公钥和私钥)。
|
String |
toString()
过时的。
返回一个关于签名者的信息字符串。
|
addCertificate, certificates, equals, getInfo, getName, getPublicKey, getScope, hashCode, identityEquals, removeCertificate, setInfo, setPublicKey, toStringprotected Signer()
public Signer(String name)
name -标识名称。
public Signer(String name, IdentityScope scope) throws KeyManagementException
name -标识名称。
scope -身份的范围。
KeyManagementException如果范围中具有相同名称的身份已经有了。
public PrivateKey getPrivateKey()
首先,如果存在安全管理器,它的checkSecurityAccess方法被称为"getSignerPrivateKey"作为是否确定返回私有密钥参数。
SecurityException -如果存在一个安全管理及其
checkSecurityAccess方法不允许将私人密钥。
SecurityManager.checkSecurityAccess(java.lang.String)
public final void setKeyPair(KeyPair pair) throws InvalidParameterException, KeyException
首先,如果存在安全管理器,它的checkSecurityAccess方法被称为"setSignerKeyPair"来看看是否可以设置密钥对其参数。
pair -初始化密钥对。
InvalidParameterException如果密钥不正确初始化。
KeyException如果密钥不能设置任何其他原因。
SecurityException -如果存在一个安全管理及其
checkSecurityAccess方法不允许设置的密钥对。
SecurityManager.checkSecurityAccess(java.lang.String)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.