net.anidb.checksum
Class TigerTreeChecksum

java.lang.Object
  extended by net.anidb.checksum.Checksum
      extended by net.anidb.checksum.TigerTreeChecksum

public class TigerTreeChecksum
extends Checksum

A class that can be used to compute the Tiger Tree checksum of a data stream.

Version:
1.0, 06.01.2010
Author:
grizzlyxp (http://anidb.net/perl-bin/animedb.pl?show=userpage&uid=63935)

Constructor Summary
TigerTreeChecksum()
          Creates a Tiger Tree checksum object.
 
Method Summary
 byte[] getDigest()
          Builds and returns the digest.
 void reset()
          Resets the checksum object.
 void update(byte[] buf, int off, int len)
          Updates the checksum with data.
 void update(int data)
          Updates the checksum with data.
 
Methods inherited from class net.anidb.checksum.Checksum
getHexDigest
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TigerTreeChecksum

public TigerTreeChecksum()
Creates a Tiger Tree checksum object.

Method Detail

reset

public void reset()
Description copied from class: Checksum
Resets the checksum object.

Specified by:
reset in class Checksum

update

public void update(byte[] buf,
                   int off,
                   int len)
Description copied from class: Checksum
Updates the checksum with data.

Specified by:
update in class Checksum
Parameters:
buf - The data buffer.
off - The offset.
len - The length.

update

public void update(int data)
Description copied from class: Checksum
Updates the checksum with data.

Specified by:
update in class Checksum
Parameters:
data - The data.

getDigest

public byte[] getDigest()
Description copied from class: Checksum

Builds and returns the digest.

After calling this method you have to use Checksum.reset().

Specified by:
getDigest in class Checksum
Returns:
The digest.
See Also:
Checksum.reset(), Checksum.getHexDigest()