01: package uk.org.ponder.hashutil;
02:
03: import uk.org.ponder.byteutil.ByteWrap;
04:
05: /** This interface specifies an object capable of incrementally digesting a stream
06: * of bytes in order to produce an integer hash value.
07: */
08:
09: public interface Hasher {
10: /** Resets this hasher to its initial state. */
11: public void reset();
12:
13: //public int eat(byte[] buffer, int start, int length);
14: /** Digests the specified sequence of bytes, and returns the new hash value.
15: * @param b The bytes to be digested.
16: * @return The new hash value.
17: */
18: public int eat(ByteWrap b);
19: }
|