java.security

Class Signer

public abstract class Signer extends Identity

Deprecated: Replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

Signer is a subclass of {@link Identity}. It is used to store a digital signature key with an Identity.
Constructor Summary
protected Signer()
Trivial constructor for serialization purposes.
Signer(String name)
Constructs a new instance of Signer with the specified identity name.
Signer(String name, IdentityScope scope)
Constructs a new instance of Signer with the specified identity name and {@link IdentityScope}.
Method Summary
PrivateKeygetPrivateKey()
Returns the private key of this Signer.
voidsetKeyPair(KeyPair pair)
Specifies the {@link KeyPair} associated with this Signer.
StringtoString()

Constructor Detail

Signer

protected Signer()
Trivial constructor for serialization purposes.

Signer

public Signer(String name)
Constructs a new instance of Signer with the specified identity name.

Parameters: name the name of the identity to use.

Signer

public Signer(String name, IdentityScope scope)
Constructs a new instance of Signer with the specified identity name and {@link IdentityScope}.

Parameters: name the name of the the identity to use. scope the {@link IdentityScope} to use.

Throws: KeyManagementException if a duplicate identity name exists within scope.

Method Detail

getPrivateKey

public PrivateKey getPrivateKey()
Returns the private key of this Signer.

Throws: SecurityException if a {@link SecurityManager} is installed which disallows this operation.

UNKNOWN: the private key of this Signer.

setKeyPair

public final void setKeyPair(KeyPair pair)
Specifies the {@link KeyPair} associated with this Signer.

Parameters: pair the {@link KeyPair} to use.

Throws: InvalidParameterException if the key-pair is invalid. KeyException if any another key-related error occurs. SecurityException if a {@link SecurityManager} is installed which disallows this operation.

toString

public String toString()

UNKNOWN: a string representing this Signer.