All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface is.logi.crypto.keys.Key

public interface Key
This interface is implemented by cryptographic keys of any type. Any actual functionality of the keys is defined in the interfaces derived from Key.

Classes implementing Key should be "read-only" in the same sense as the String class and not implement any methods to change the state of the object.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
CipherKey, SignatureKey

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.

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 abstract Fingerprint getFingerprint()
Return the key's SHA1 fingerprint.

 o matchFingerprint
 public abstract 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 abstract 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)
Check if a key mathces this. This is 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