is.logi.crypto.keys
Class KeyPair

java.lang.Object
  |
  +--is.logi.crypto.Crypto
        |
        +--is.logi.crypto.keys.KeyPair

public class KeyPair
extends Crypto

This class is a simple holder for a pair of public/private keys. Some encryption algorithms only use a single key, in which case the public and private fields of a KeyPair may reference the same object. Either the public or private fields may be null if the key is unknown..

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
Key, KeyRing

Fields inherited from class is.logi.crypto.Crypto
BIT, cdsPath, keySource, NIBBLE, primeCertainty, random
 
Constructor Summary
KeyPair(Key pub, Key pri)
          Create a new KeyPair holder.
 
Method Summary
 Key getPrivate()
          Return the private key from the pair.
 Key getPublic()
          Return the public key from the pair.
 java.lang.String toString()
          Return a CDS for this key-pair.
 
Methods inherited from class is.logi.crypto.Crypto
binString, binString, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, readInt, writeBytes, writeBytes, writeInt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyPair

public KeyPair(Key pub,
               Key pri)
Create a new KeyPair holder.
Method Detail

getPublic

public Key getPublic()
Return the public key from the pair.

getPrivate

public Key getPrivate()
Return the private key from the pair.

toString

public java.lang.String toString()
Return a CDS for this key-pair.
Overrides:
toString in class java.lang.Object
See Also:
Crypto.fromString(String)


Copyright 1997-1999 Logi Ragnarsson