|
||||||||||
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
This abstract class implements some of the methods from the Key interface. It is used as the superclass of all the key classes in logi.crypto.
You should (probably) never declare variables of this type, but rather of the more abstract Key interface, since there might be key objects which do not inherit from this class.
Field Summary | |
protected Fingerprint |
fingerprint
|
protected Fingerprint |
otherFingerprint
|
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
K()
|
Method Summary | |
protected abstract Fingerprint |
calcFingerprint(boolean other,
java.lang.String algorithm)
Calculate the fingerprint for this key or the other in the pair. |
Fingerprint |
getFingerprint()
Return the key's fingerprint using the default hash function. |
Fingerprint |
getFingerprint(java.lang.String algorithm)
Return the key's fingerprint using the named hash function. |
int |
hashCode()
Return a hash-code based on the keys SHA1 fingerprint. |
Fingerprint |
matchFingerprint()
Returns the default fingerprint of the matching key in the key-pair. |
Fingerprint |
matchFingerprint(java.lang.String algorithm)
Returns the default fingerprint of the matching key in the key-pair. |
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, isPrivate, matches |
Field Detail |
protected Fingerprint fingerprint
protected Fingerprint otherFingerprint
Constructor Detail |
public K()
Method Detail |
protected abstract Fingerprint calcFingerprint(boolean other, java.lang.String algorithm) throws InvalidCDSException
InvalidCDSException
public final Fingerprint getFingerprint()
getFingerprint
in interface Key
public final Fingerprint getFingerprint(java.lang.String algorithm) throws InvalidCDSException
getFingerprint
in interface Key
InvalidCDSException
- if the specified hash function is not
available.public Fingerprint matchFingerprint()
matchFingerprint
in interface Key
public Fingerprint matchFingerprint(java.lang.String algorithm) throws InvalidCDSException
matchFingerprint
in interface Key
InvalidCDSException
- if the specified hash function is not
available.public final int hashCode()
hashCode
in interface Key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |