java.security
Class Signer

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.security.Identity sample code for java.security.Identity definition code for java.security.Identity 
      extended by java.security.Signer
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Principal sample code for java.security.Principal definition code for java.security.Principal

Deprecated. This class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

@Deprecated
public abstract class Signer
extends Identity sample code for java.security.Identity definition code for java.security.Identity

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 sample code for java.security.Identity definition code for java.security.Identity , Serialized Form

Constructor Summary
protected Signer sample code for java.security.Signer.Signer() definition code for java.security.Signer.Signer() ()
          Deprecated. Creates a signer.
  Signer sample code for java.security.Signer.Signer(java.lang.String) definition code for java.security.Signer.Signer(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  name)
          Deprecated. Creates a signer with the specified identity name.
  Signer sample code for java.security.Signer.Signer(java.lang.String, java.security.IdentityScope) definition code for java.security.Signer.Signer(java.lang.String, java.security.IdentityScope) (String sample code for java.lang.String definition code for java.lang.String  name, IdentityScope sample code for java.security.IdentityScope definition code for java.security.IdentityScope  scope)
          Deprecated. Creates a signer with the specified identity name and scope.
 
Method Summary
 PrivateKey sample code for java.security.PrivateKey definition code for java.security.PrivateKey getPrivateKey sample code for java.security.Signer.getPrivateKey() definition code for java.security.Signer.getPrivateKey() ()
          Deprecated. Returns this signer's private key.
 void setKeyPair sample code for java.security.Signer.setKeyPair(java.security.KeyPair) definition code for java.security.Signer.setKeyPair(java.security.KeyPair) (KeyPair sample code for java.security.KeyPair definition code for java.security.KeyPair  pair)
          Deprecated. Sets the key pair (public key and private key) for this signer.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for java.security.Signer.toString() definition code for java.security.Signer.toString() ()
          Deprecated. Returns a string of information about the signer.
 
Methods inherited from class java.security.Identity sample code for java.security.Identity definition code for java.security.Identity
addCertificate sample code for java.security.Identity.addCertificate(java.security.Certificate) definition code for java.security.Identity.addCertificate(java.security.Certificate) , certificates sample code for java.security.Identity.certificates() definition code for java.security.Identity.certificates() , equals sample code for java.security.Identity.equals(java.lang.Object) definition code for java.security.Identity.equals(java.lang.Object) , getInfo sample code for java.security.Identity.getInfo() definition code for java.security.Identity.getInfo() , getName sample code for java.security.Identity.getName() definition code for java.security.Identity.getName() , getPublicKey sample code for java.security.Identity.getPublicKey() definition code for java.security.Identity.getPublicKey() , getScope sample code for java.security.Identity.getScope() definition code for java.security.Identity.getScope() , hashCode sample code for java.security.Identity.hashCode() definition code for java.security.Identity.hashCode() , identityEquals sample code for java.security.Identity.identityEquals(java.security.Identity) definition code for java.security.Identity.identityEquals(java.security.Identity) , removeCertificate sample code for java.security.Identity.removeCertificate(java.security.Certificate) definition code for java.security.Identity.removeCertificate(java.security.Certificate) , setInfo sample code for java.security.Identity.setInfo(java.lang.String) definition code for java.security.Identity.setInfo(java.lang.String) , setPublicKey sample code for java.security.Identity.setPublicKey(java.security.PublicKey) definition code for java.security.Identity.setPublicKey(java.security.PublicKey) , toString sample code for java.security.Identity.toString(boolean) definition code for java.security.Identity.toString(boolean)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

Signer sample code for java.security.Signer() definition code for java.security.Signer()

protected Signer()
Deprecated. 
Creates a signer. This constructor should only be used for serialization.


Signer sample code for java.security.Signer(java.lang.String) definition code for java.security.Signer(java.lang.String)

public Signer(String sample code for java.lang.String definition code for java.lang.String  name)
Deprecated. 
Creates a signer with the specified identity name.

Parameters:
name - the identity name.

Signer sample code for java.security.Signer(java.lang.String, java.security.IdentityScope) definition code for java.security.Signer(java.lang.String, java.security.IdentityScope)

public Signer(String sample code for java.lang.String definition code for java.lang.String  name,
              IdentityScope sample code for java.security.IdentityScope definition code for java.security.IdentityScope  scope)
       throws KeyManagementException sample code for java.security.KeyManagementException definition code for java.security.KeyManagementException 
Deprecated. 
Creates a signer with the specified identity name and scope.

Parameters:
name - the identity name.
scope - the scope of the identity.
Throws:
KeyManagementException sample code for java.security.KeyManagementException definition code for java.security.KeyManagementException - if there is already an identity with the same name in the scope.
Method Detail

getPrivateKey sample code for java.security.Signer.getPrivateKey() definition code for java.security.Signer.getPrivateKey()

public PrivateKey sample code for java.security.PrivateKey definition code for java.security.PrivateKey  getPrivateKey()
Deprecated. 
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.

Returns:
this signer's private key, or null if the private key has not yet been set.
Throws:
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow returning the private key.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String)

setKeyPair sample code for java.security.Signer.setKeyPair(java.security.KeyPair) definition code for java.security.Signer.setKeyPair(java.security.KeyPair)

public final void setKeyPair(KeyPair sample code for java.security.KeyPair definition code for java.security.KeyPair  pair)
                      throws InvalidParameterException sample code for java.security.InvalidParameterException definition code for java.security.InvalidParameterException ,
                             KeyException sample code for java.security.KeyException definition code for java.security.KeyException 
Deprecated. 
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.
Throws:
InvalidParameterException sample code for java.security.InvalidParameterException definition code for java.security.InvalidParameterException - if the key pair is not properly initialized.
KeyException sample code for java.security.KeyException definition code for java.security.KeyException - if the key pair cannot be set for any other reason.
SecurityException sample code for java.lang.SecurityException definition code for java.lang.SecurityException - if a security manager exists and its checkSecurityAccess method doesn't allow setting the key pair.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String)

toString sample code for java.security.Signer.toString() definition code for java.security.Signer.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
Deprecated. 
Returns a string of information about the signer.

Specified by:
toString sample code for java.security.Principal.toString() definition code for java.security.Principal.toString() in interface Principal sample code for java.security.Principal definition code for java.security.Principal
Overrides:
toString sample code for java.security.Identity.toString() definition code for java.security.Identity.toString() in class Identity sample code for java.security.Identity definition code for java.security.Identity
Returns:
a string of information about the signer.
See Also:
SecurityManager.checkSecurityAccess(java.lang.String) sample code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String) definition code for java.lang.SecurityManager.checkSecurityAccess(java.lang.String)