Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper version 1.2.18
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## iaik.pkcs.pkcs11.objects
Class KeyPair

    java.lang.Object
      |
      +--iaik.pkcs.pkcs11.objects.KeyPair

All Implemented Interfaces:
  java.lang.Cloneable

public class KeyPair
extends java.lang.Object
implements java.lang.Cloneable

This class does not correspond to any PKCS#11 object. It is only a pair of a private key and a public key.

Version:
  1.0
Author:
  Karl Scheibelhofer

Field Summary
`protected PrivateKey` | `privateKey_` The private key of this key-pair.
`protected PublicKey` | `publicKey_` The public key of this key-pair.

Constructor Summary
`KeyPair(PublicKey publicKey, PrivateKey privateKey)` Constructor that takes a public and a private key.

Method Summary
`java.lang.Object` | `clone()` Create a (deep) clone of this object.
`boolean` | `equals(java.lang.Object otherObject)` Compares all member variables of this object with the other object.
`PrivateKey` | `getPrivateKey()` Get the private key part of this key-pair.
`PublicKey` | `getPublicKey()` Get the public key part of this key-pair.
`int` | `hashCode()` The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
`void` | `setPrivateKey(PrivateKey privateKey)` Set the private key part of this key-pair.
`void` | `setPublicKey(PublicKey publicKey)` Set the public key part of this key-pair.
`java.lang.String` | `toString()` This method returns a string representation of the current object.

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### publicKey_

    protected PublicKey publicKey_

  The public key of this key-pair.

### privateKey_

    protected PrivateKey privateKey_

  The private key of this key-pair.

Constructor Detail

### KeyPair

    public KeyPair(PublicKey publicKey,
                   PrivateKey privateKey)

  Constructor that takes a public and a private key. None can be null.
  Parameters:
    `publicKey` - The public key of the key-pair.
    `privateKey` - The private key of the key-pair.

Method Detail

### clone

    public java.lang.Object clone()

  Create a (deep) clone of this object.
  Overrides:
    `clone` in class `java.lang.Object`
  Returns:
    A clone of this object.

### getPublicKey

    public PublicKey getPublicKey()

  Get the public key part of this key-pair.
  Returns:
    The public key part of this key-pair.

### setPublicKey

    public void setPublicKey(PublicKey publicKey)

  Set the public key part of this key-pair.
  Parameters:
    `publicKey` - The public key part of this key-pair.

### getPrivateKey

    public PrivateKey getPrivateKey()

  Get the private key part of this key-pair.
  Returns:
    The private key part of this key-pair.

### setPrivateKey

    public void setPrivateKey(PrivateKey privateKey)

  Set the private key part of this key-pair.
  Parameters:
    `privateKey` - The private key part of this key-pair.

### toString

    public java.lang.String toString()

  This method returns a string representation of the current object. The output is only for debugging purposes and should not be used for other purposes.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A string presentation of this object for debugging output.

### equals

    public boolean equals(java.lang.Object otherObject)

  Compares all member variables of this object with the other object. Returns only true, if all are equal in both objects.
  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `otherObject` - The other object to compare to.
  Returns:
    True, if other is an instance of this class and all member variables of both objects are equal. False, otherwise.

### hashCode

    public int hashCode()

  The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    The hash code of this object.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| IAIK PKCS#11 Wrapper version 1.2.18
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. version 1.2.18