All Packages Class Hierarchy This Package Previous Next Index
Class is.logi.crypto.keys.K
java.lang.Object
|
+----is.logi.crypto.Crypto
|
+----is.logi.crypto.keys.K
- 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)
-
K()
-
-
getAlgorithm()
- Return the name of the algorithm used by this key.
-
getFingerprint()
- Return the key's SHA1 fingerprint.
-
getSize()
- Return the "size" of the key.
-
hashCode()
- Return a hash-code based on the keys SHA1 fingerprint.
-
isPrivate()
- Returns true iff this is a private key.
-
matches(Key)
- Check if a key mathces this.
-
matchFingerprint()
- Returns the fingerprint of the matching key in the key-pair.
K
public K()
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.
getFingerprint
public final Fingerprint getFingerprint()
- Return the key's SHA1 fingerprint.
matchFingerprint
public Fingerprint matchFingerprint()
- Returns the fingerprint of the matching key in the key-pair.
hashCode
public final int hashCode()
- Return a hash-code based on the keys SHA1 fingerprint.
- Overrides:
- hashCode in class Object
All Packages Class Hierarchy This Package Previous Next Index