is.logi.crypto.keys
Class K

java.lang.Object
  |
  +--is.logi.crypto.Crypto
        |
        +--is.logi.crypto.keys.K
Direct Known Subclasses:
DHKey, RSAKey, SymmetricKey

public abstract class K
extends Crypto
implements Key

This abstract class implements some of the methods from the Key interface. It is used as the superclass of all the key classes in Crypto.

You should probably never declare variables of this type, but rather of the more abstract Key interface, since it is extended by the CipherKey and SignatureKey interfaces.

Author:
Logi Ragnarsson (logir@hi.is)

Fields inherited from class is.logi.crypto.Crypto
BIT, cdsPath, keySource, NIBBLE, primeCertainty, random
 
Constructor Summary
K()
           
 
Method Summary
 Fingerprint getFingerprint()
          Return the key's SHA1 fingerprint.
abstract  int getSize()
          Return the "size" of the key.
 int hashCode()
          Return a hash-code based on the keys SHA1 fingerprint.
 Fingerprint matchFingerprint()
          Returns the fingerprint of the matching key in the 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, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

K

public K()
Method Detail

getSize

public abstract int getSize()
Return the "size" of the key. This is a (fairly inaccurate) measure of how difficult it is to break and is heavily dependant on the algorithm used.
Specified by:
getSize in interface Key

getFingerprint

public final Fingerprint getFingerprint()
Return the key's SHA1 fingerprint.
Specified by:
getFingerprint in interface Key

matchFingerprint

public Fingerprint matchFingerprint()
Returns the fingerprint of the matching key in the key-pair.
Specified by:
matchFingerprint in interface Key

hashCode

public final int hashCode()
Return a hash-code based on the keys SHA1 fingerprint.
Specified by:
hashCode in interface Key
Overrides:
hashCode in class java.lang.Object


Copyright 1997-1999 Logi Ragnarsson