Skip to content

Most visited

Recently visited

navigation
Added in API level 1
Deprecated since API level 1

Signer

public abstract class Signer
extends Identity

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


This class was deprecated in API level 1.
Use the java.security.cert package and Principal instead.

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.

Inherited methods

From class java.security.Identity
From class java.lang.Object
From interface java.security.Principal

Public constructors

Signer

Added in API level 1
Signer (String name)

Constructs a new instance of Signer with the given name.

Parameters
name String: the name of the signer.

Signer

Added in API level 1
Signer (String name, 
                IdentityScope scope)

Constructs a new instance of Signer with the given name in the given scope.

Parameters
name String: the name of the signer.
scope IdentityScope: the scope of the signer.
Throws
KeyManagementException if a signer with the specified name already exists in the provided scope.

Protected constructors

Signer

Added in API level 1
Signer ()

Constructs a new instance of Signer.

Public methods

getPrivateKey

Added in API level 1
PrivateKey getPrivateKey ()

Returns the private key of this Signer.

Returns
PrivateKey

setKeyPair

Added in API level 1
void setKeyPair (KeyPair pair)

Associates the specified key pair with this Signer.

Parameters
pair KeyPair: the key pair to associate with this Signer.
Throws
InvalidParameterException if the key pair is invalid.
KeyException if any other key related problem occurs.

toString

Added in API level 1
String toString ()

Returns a string containing a concise, human-readable description of this Signer including its name and its scope if present.

Returns
String a printable representation for this Signer.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.