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)

Constructor Index

 o K()

Method Index

 o getAlgorithm()
Return the name of the algorithm used by this key.
 o getFingerprint()
Return the key's SHA1 fingerprint.
 o getSize()
Return the "size" of the key.
 o hashCode()
Return a hash-code based on the keys SHA1 fingerprint.
 o isPrivate()
Returns true iff this is a private key.
 o matches(Key)
Returns true if this and key are a matched pair of public/private keys or the same symmetric key.
 o matchFingerprint()
Returns the fingerprint of the matching key in the key-pair.

Constructors

 o K
 public K()

Methods

 o 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.

 o getFingerprint
 public final Fingerprint getFingerprint()
Return the key's SHA1 fingerprint.

 o matchFingerprint
 public Fingerprint matchFingerprint()
Returns the fingerprint of the matching key in the key-pair.

 o getAlgorithm
 public abstract String getAlgorithm()
Return the name of the algorithm used by this key.

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

 o hashCode
 public final int hashCode()
Return a hash-code based on the keys SHA1 fingerprint.

Overrides:
hashCode in class Object
 o 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