All Packages Class Hierarchy This Package Previous Next Index
Class is.hi.logir.cryptonite.K
java.lang.Object
|
+----is.hi.logir.cryptonite.Cryptonite
|
+----is.hi.logir.cryptonite.K
- public abstract class K
- extends Cryptonite
- implements Key
This class implements some of the methods from the Key interface. It is
used as the superclass of all the key classes in Cryptonite.
- 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)
- Returns true if this and key are a matched pair of public/private
keys or the same symmetric key.
-
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 measure of how
difficult it is to break and is heavily dependant on
the algorithm used. In many cases it will be the
actual number of bits needed to store the key.
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.
getAlgorithm
public abstract String getAlgorithm()
- Return the name of the algorithm used by this key.
isPrivate
public abstract boolean isPrivate()
- Returns true iff this is a private key.
hashCode
public final int hashCode()
- Return a hash-code based on the keys SHA1 fingerprint.
- Overrides:
- hashCode in class Object
matches
public abstract boolean matches(Key key)
- Returns true if this and key are a matched pair of public/private
keys or the same symmetric key.
All Packages Class Hierarchy This Package Previous Next Index