|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.logi.crypto.Crypto
org.logi.crypto.keys.K
org.logi.crypto.keys.SymmetricKey
This abstract class implements some (more) of the methods from the Key interface.
KeyPair
,
KeyRing
Field Summary |
Fields inherited from class org.logi.crypto.keys.K |
fingerprint, otherFingerprint |
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 | |
protected Fingerprint |
calcFingerprint(boolean other,
java.lang.String algorithm)
Calculate the fingerprint for this key using the named hash function. |
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 |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.logi.crypto.keys.Key |
getAlgorithm, getSize |
Constructor Detail |
public SymmetricKey()
Method Detail |
protected Fingerprint calcFingerprint(boolean other, java.lang.String algorithm) throws InvalidCDSException
calcFingerprint
in class K
InvalidCDSException
public boolean isPrivate()
Symmetric keys simply return true
.
public boolean matches(Key key)
Symmetric keys simply call equals(key)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |