org.logi.crypto.keys
Class SymmetricKey

java.lang.Object
  |
  +--org.logi.crypto.Crypto
        |
        +--org.logi.crypto.keys.K
              |
              +--org.logi.crypto.keys.SymmetricKey
All Implemented Interfaces:
Key
Direct Known Subclasses:
BlowfishKey, CaesarKey, DESKey, TriDESKey

public abstract class SymmetricKey
extends K

This abstract class implements some (more) of the methods from the Key interface.

Author:
Logi Ragnarsson (logir@logi.org)
See Also:
KeyPair, KeyRing

Fields inherited from class org.logi.crypto.Crypto
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO
 
Constructor Summary
SymmetricKey()
           
 
Method Summary
 boolean isPrivate()
          Returns true iff this is a private key.
 boolean matches(Key key)
          Returns true if this and key are the same symmetric key.
 
Methods inherited from class org.logi.crypto.keys.K
getFingerprint, getFingerprint, hashCode, matchFingerprint, matchFingerprint
 
Methods inherited from class org.logi.crypto.Crypto
binString, binString, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, readBlock, readInt, writeBytes, writeBytes, writeInt
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.logi.crypto.keys.Key
getAlgorithm, getSize
 

Constructor Detail

SymmetricKey

public SymmetricKey()
Method Detail

isPrivate

public boolean isPrivate()
Returns true iff this is a private key.

Symmetric keys simply return true.


matches

public boolean matches(Key key)
Returns true if this and key are the same symmetric key.

Symmetric keys simply call equals(key).



Copyright 1997-2000 Logi Ragnarsson