All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class IS.hi.logir.cryptonite.FingerprintState

java.lang.Object
   |
   +----IS.hi.logir.cryptonite.FingerprintState

public abstract class FingerprintState
extends Object
implements Serializable
An object of this class holds the status of a fingerprint still being calculated.

A fingerprint state object can be repeatedly updated with data. At any time a Fingerprint object can be requested for the data that has then been added to the fingerprint state.

Any subclass of FingerprintState should override the abstract methods in FingerprintState and add a method:

public static FingerprintState createState() {...}
which returns a new instance of the subclass.

Author:
Logi Ragnarsson (logir@hi.is)
See Also:
MD5Fingerprint, FingerprintStatus, Signature

Variable Index

 o classesRegistered
 o fingerprintClasses

Constructor Index

 o FingerprintState()

Method Index

 o addFingerprintClass(String, Class)
Add the class c to the list of available fingerprint classes.
 o calculate()
Return a fingerprint for the curret state, without destroying the state.
 o createState(String)
Create a FingerprintState object for the named fingerprint algorithm.
 o registerIncludedClasses()
 o reset()
Reset the state.
 o update(byte[])
Update the fingerprint state with the bytes from buf.
 o update(byte[], int, int)
Update the fingerprint state with the bytes from buf[offset, offset+length-1].
 o update(String)
Update the fingerprint state with the characters from s.

Variables

 o fingerprintClasses
 private static Hashtable fingerprintClasses
 o classesRegistered
 static boolean classesRegistered

Constructors

 o FingerprintState
 public FingerprintState()

Methods

 o addFingerprintClass
 public static void addFingerprintClass(String name,
                                        Class c)
Add the class c to the list of available fingerprint classes. It is registered with the specified name. Each non-abstract sub-class of Fingerprint should call Fingerprint.addHashClass to make its existance known.

 o registerIncludedClasses
 private static void registerIncludedClasses() throws BadFingerprintClassException
 o createState
 public static FingerprintState createState(String name) throws BadFingerprintClassException
Create a FingerprintState object for the named fingerprint algorithm.

 o reset
 public abstract void reset()
Reset the state.

 o update
 public abstract void update(byte buf[],
                             int offset,
                             int length)
Update the fingerprint state with the bytes from buf[offset, offset+length-1].

 o update
 public void update(byte buf[])
Update the fingerprint state with the bytes from buf.

 o update
 public void update(String s)
Update the fingerprint state with the characters from s.

 o calculate
 public abstract Fingerprint calculate()
Return a fingerprint for the curret state, without destroying the state.


All Packages  Class Hierarchy  This Package  Previous  Next  Index