public abstract class

Signer

extends Identity
java.lang.Object
   ↳ java.security.Identity
     ↳ java.security.Signer

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
From class java.lang.Object
From interface java.security.Principal

Public Constructors

public Signer (String name)

Constructs a new instance of Signer with the given name.

Parameters
name the name of the signer.

public Signer (String name, IdentityScope scope)

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.
Throws
KeyManagementException if a signer with the specified name already exists in the provided scope.

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.
Throws
InvalidParameterException if the key pair is invalid.
KeyException if any other key related problem occurs.
SecurityException if a SecurityManager is installed and the caller does not have permission to invoke this method.

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.