to top
Android APIs
public abstract class

Signer

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

This class was deprecated in API level 1.
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)

Added in API level 1

Constructs a new instance of Signer with the given name.

Parameters
name the name of the signer.

public Signer (String name, IdentityScope scope)

Added in API level 1

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 ()

Added in API level 1

Constructs a new instance of Signer.

Public Methods

public PrivateKey getPrivateKey ()

Added in API level 1

Returns the private key of this Signer.

public final void setKeyPair (KeyPair pair)

Added in API level 1

Associates the specified key pair with this Signer.

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.

public String toString ()

Added in API level 1

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.