jonelo.jacksum.adapt.com.bitzi.util

Class TigerTree


public class TigerTree
extends MessageDigest

Implementation of THEX tree hash algorithm, with Tiger as the internal algorithm (using the approach as revised in December 2002, to add unique prefixes to leaf and node operations) For simplicity, calculates one entire generation before starting on the next. A more space-efficient approach would use a stack, and calculate each node as soon as its children ara available.

Constructor Summary

TigerTree(String name)
Constructor

Method Summary

protected void
blockUpdate()
Update the internal state with a single block of size 1024 (or less, in final block) from the internal buffer.
Object
clone()
protected byte[]
engineDigest()
protected int
engineDigest(byte[] buf, int offset, int len)
protected int
engineGetDigestLength()
protected void
engineReset()
protected void
engineUpdate(byte in)
protected void
engineUpdate(byte[] in, int offset, int length)

Constructor Details

TigerTree

public TigerTree(String name)
            throws NoSuchAlgorithmException
Constructor

Method Details

blockUpdate

protected void blockUpdate()
Update the internal state with a single block of size 1024 (or less, in final block) from the internal buffer.

clone

public Object clone()
            throws CloneNotSupportedException

engineDigest

protected byte[] engineDigest()

engineDigest

protected int engineDigest(byte[] buf,
                           int offset,
                           int len)
            throws DigestException

engineGetDigestLength

protected int engineGetDigestLength()

engineReset

protected void engineReset()

engineUpdate

protected void engineUpdate(byte in)

engineUpdate

protected void engineUpdate(byte[] in,
                            int offset,
                            int length)