org.javasign.util
Class KeyAndCertificate

java.lang.Object
  |
  +--org.javasign.util.KeyAndCertificate

public class KeyAndCertificate
extends java.lang.Object

This class encapsulates a key and an optional certificate.


Field Summary
protected  X509PublicKeyCertificate certificate_
          This optional certificate.
protected  Key key_
          The key.
 
Constructor Summary
KeyAndCertificate(Key key, X509PublicKeyCertificate certificate)
          Creates a new object that holds the given key and certificate.
 
Method Summary
 X509PublicKeyCertificate getCertificate()
          Returns the certificate.
 Key getKey()
          Returns the key.
 void setCertificate(X509PublicKeyCertificate certificate)
          Sets the certificate.
 void setKey(Key key)
          Sets the key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key_

protected Key key_
The key.


certificate_

protected X509PublicKeyCertificate certificate_
This optional certificate.

Constructor Detail

KeyAndCertificate

public KeyAndCertificate(Key key,
                         X509PublicKeyCertificate certificate)
Creates a new object that holds the given key and certificate.

Parameters:
key - The key.
certificate - The certificate.
Method Detail

getCertificate

public X509PublicKeyCertificate getCertificate()
Returns the certificate.

Returns:
The certificate.

getKey

public Key getKey()
Returns the key.

Returns:
The key.

setCertificate

public void setCertificate(X509PublicKeyCertificate certificate)
Sets the certificate.

Parameters:
certificate - The certificate.

setKey

public void setKey(Key key)
Sets the key.

Parameters:
key - The key.