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
-
classesRegistered
-
-
fingerprintClasses
-
-
FingerprintState()
-
-
addFingerprintClass(String, Class)
- Add the class c to the list of available fingerprint classes.
-
calculate()
-
Return a fingerprint for the curret state, without
destroying the state.
-
createState(String)
- Create a FingerprintState object for the named fingerprint
algorithm.
-
registerIncludedClasses()
-
-
reset()
- Reset the state.
-
update(byte[])
- Update the fingerprint state with the bytes from buf.
-
update(byte[], int, int)
- Update the fingerprint state with the bytes from
buf[offset, offset+length-1].
-
update(String)
- Update the fingerprint state with the characters from s.
fingerprintClasses
private static Hashtable fingerprintClasses
classesRegistered
static boolean classesRegistered
FingerprintState
public FingerprintState()
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.
registerIncludedClasses
private static void registerIncludedClasses() throws BadFingerprintClassException
createState
public static FingerprintState createState(String name) throws BadFingerprintClassException
- Create a FingerprintState object for the named fingerprint
algorithm.
reset
public abstract void reset()
- Reset the state.
update
public abstract void update(byte buf[],
int offset,
int length)
- Update the fingerprint state with the bytes from
buf[offset, offset+length-1].
update
public void update(byte buf[])
- Update the fingerprint state with the bytes from buf.
update
public void update(String s)
- Update the fingerprint state with the characters from s.
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