| java.lang.Object java.security.Identity java.security.Signer
All known Subclasses: sun.security.provider.SystemSigner,
Signer | abstract public class Signer extends Identity (Code) | | This class is used to represent an Identity that can also digitally
sign data.
The management of a signer's private keys is an important and
sensitive issue that should be handled by subclasses as appropriate
to their intended use.
See Also: Identity version: 1.37 00/02/02 author: Benjamin Renaud |
Constructor Summary | |
protected | Signer() Creates a signer. | public | Signer(String name) Creates a signer with the specified identity name. | public | Signer(String name, IdentityScope scope) Creates a signer with the specified identity name and scope. |
Method Summary | |
public PrivateKey | getPrivateKey() Returns this signer's private key.
First, if there is a security manager, its checkSecurityAccess
method is called with "getSignerPrivateKey"
as its argument to see if it's ok to return the private key. | String | printKeys() | final public void | setKeyPair(KeyPair pair) Sets the key pair (public key and private key) for this signer.
First, if there is a security manager, its checkSecurityAccess
method is called with "setSignerKeyPair"
as its argument to see if it's ok to set the key pair. | public String | toString() Returns a string of information about the signer. |
Signer | protected Signer()(Code) | | Creates a signer. This constructor should only be used for
serialization.
|
Signer | public Signer(String name)(Code) | | Creates a signer with the specified identity name.
Parameters: name - the identity name. |
getPrivateKey | public PrivateKey getPrivateKey()(Code) | | Returns this signer's private key.
First, if there is a security manager, its checkSecurityAccess
method is called with "getSignerPrivateKey"
as its argument to see if it's ok to return the private key.
this signer's private key, or null if the private key hasnot yet been set. exception: SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow returning the private key. See Also: SecurityManager.checkSecurityAccess |
setKeyPair | final public void setKeyPair(KeyPair pair) throws InvalidParameterException, KeyException(Code) | | Sets the key pair (public key and private key) for this signer.
First, if there is a security manager, its checkSecurityAccess
method is called with "setSignerKeyPair"
as its argument to see if it's ok to set the key pair.
Parameters: pair - an initialized key pair. exception: InvalidParameterException - if the key pair is notproperly initialized. exception: KeyException - if the key pair cannot be set for anyother reason. exception: SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow setting the key pair. See Also: SecurityManager.checkSecurityAccess |
toString | public String toString()(Code) | | Returns a string of information about the signer.
a string of information about the signer. |
|
|