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)

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)
Check if a key mathces this.
 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 (fairly inaccurate) measure of how difficult it is to break and is heavily dependant on the algorithm used.

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