This class is deprecated.
Replaced by behavior in java.security.cert package and Principal
Class Overview
Signer represents an identity (individual or corporation) that owns a
private key and the corresponding public key.
Summary
| Public Constructors |
|
|
Signer(String name)
Constructs a new instance of Signer with the given name.
|
|
|
Signer(String name, IdentityScope scope)
Constructs a new instance of Signer with the given name in the
given scope.
|
| Protected Constructors |
|
|
Signer()
Constructs a new instance of Signer.
|
| Public Methods |
|
PrivateKey
|
getPrivateKey()
Returns the private key of this Signer.
|
|
final
void
|
setKeyPair(KeyPair pair)
Associates the specified key pair with this Signer.
|
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
Signer including its name and its scope if present.
|
|
[Expand]
Inherited Methods |
From class java.security.Identity
|
void
|
addCertificate(Certificate certificate)
Adds a Certificate to this Identity.
|
|
Certificate[]
|
certificates()
Returns the certificates for this Identity.
|
|
final
boolean
|
equals(Object obj)
Compares the specified object with this Identity for equality and
returns true if the specified object is equal, false
otherwise.
|
|
String
|
getInfo()
Returns the information string of this Identity.
|
|
final
String
|
getName()
Returns the name of this Identity.
|
|
PublicKey
|
getPublicKey()
Returns the PublicKey associated with this Identity.
|
|
final
IdentityScope
|
getScope()
Returns the IdentityScope of this Identity.
|
|
int
|
hashCode()
Returns the hash code value for this Identity.
|
|
boolean
|
identityEquals(Identity identity)
Compares the specified Identity with this Identity for
equality and returns true if the specified object is equal,
false otherwise.
|
|
void
|
removeCertificate(Certificate certificate)
Removes the specified Certificate from this Identity.
|
|
void
|
setInfo(String info)
Sets an information string for this Identity.
|
|
void
|
setPublicKey(PublicKey key)
Sets the specified PublicKey to this Identity.
|
|
String
|
toString(boolean detailed)
Returns a string containing a concise, human-readable description of the
this Identity.
|
|
String
|
toString()
Returns a string containing a concise, human-readable description of the
this Identity including its name and its scope.
|
|
From class java.lang.Object
|
Object
|
clone()
Creates and returns a copy of this Object.
|
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
|
void
|
finalize()
Is called before the object's memory is being reclaimed by the VM.
|
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class which represents this
object's class.
|
|
int
|
hashCode()
Returns an integer hash code for this object.
|
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
|
From interface java.security.Principal
|
abstract
boolean
|
equals(Object obj)
Compares the specified object with this Principal for equality
and returns true if the specified object is equal, false
otherwise.
|
|
abstract
String
|
getName()
Returns the name of this Principal.
|
|
abstract
int
|
hashCode()
Returns the hash code value for this Principal.
|
|
abstract
String
|
toString()
Returns a string containing a concise, human-readable description of
this Principal.
|
|
Public Constructors
public
Signer
(String name)
Constructs a new instance of Signer with the given name.
Parameters
| name
| the name of the signer.
|
Constructs a new instance of Signer with the given name in the
given scope.
Parameters
| name
| the name of the signer. |
| scope
| the scope of the signer. |
Protected Constructors
protected
Signer
()
Constructs a new instance of Signer.
Public Methods
public
PrivateKey
getPrivateKey
()
Returns the private key of this Signer. If a SecurityManager is installed, code calling this method needs the SecurityPermission "getSignerPrivateKey" to be granted, otherwise
a SecurityException will be thrown.
Returns
- the private key of this
Signer.
Throws
| SecurityException
| if a SecurityManager is installed and the caller does
not have permission to invoke this method.
|
public
final
void
setKeyPair
(KeyPair pair)
Associates the specified key pair with this Signer. If a SecurityManager is installed, code calling this method needs the SecurityPermission getSignerPrivateKey to be granted, otherwise
a SecurityException will be thrown.
Parameters
| pair
| the key pair to associate with this Signer. |
public
String
toString
()
Returns a string containing a concise, human-readable description of this
Signer including its name and its scope if present.
Returns
- a printable representation for this
Signer.