Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

gnu.java.security.hash
Class Tiger  view Tiger download Tiger.java

java.lang.Object
  extended bygnu.java.security.hash.BaseHash
      extended bygnu.java.security.hash.Tiger
All Implemented Interfaces:
java.lang.Cloneable, IMessageDigest

public class Tiger
extends BaseHash

The Tiger message digest. Tiger was designed by Ross Anderson and Eli Biham, with the goal of producing a secure, fast hash function that performs especially well on next-generation 64-bit architectures, but is still efficient on 32- and 16-bit architectures.

Tiger processes data in 512-bit blocks and produces a 192-bit digest.

References:

  1. Tiger: A Fast New Hash Function, Ross Anderson and Eli Biham.


Field Summary
private  long a
           
private static long A
           
private  long b
           
private static long B
           
private static int BLOCK_SIZE
           
private  long c
           
private static long C
           
private static java.lang.String DIGEST0
          Result when no data has been input.
private static int HASH_SIZE
           
private static long[] T1
          S-Box T1.
private static long[] T2
          S-Box T2.
private static long[] T3
          S-Box T3.
private static long[] T4
          S-Box T4.
private static java.lang.Boolean valid
           
 
Fields inherited from class gnu.java.security.hash.BaseHash
blockSize, buffer, count, hashSize, name
 
Constructor Summary
  Tiger()
          Trivial 0-arguments constructor.
private Tiger(Tiger that)
          Private copying constructor for cloning.
 
Method Summary
 java.lang.Object clone()
          Returns a clone copy of this instance.
protected  byte[] getResult()
          Constructs the result from the contents of the current context.
protected  byte[] padBuffer()
          Returns the byte array to use as padding before completing a hash operation.
protected  void resetContext()
          Resets the instance for future re-use.
 boolean selfTest()
          A basic test.
protected  void transform(byte[] in, int offset)
          The block digest transformation per se.
 
Methods inherited from class gnu.java.security.hash.BaseHash
blockSize, digest, hashSize, name, reset, update, update, update
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HASH_SIZE

private static final int HASH_SIZE
See Also:
Constant Field Values

BLOCK_SIZE

private static final int BLOCK_SIZE
See Also:
Constant Field Values

DIGEST0

private static final java.lang.String DIGEST0
Result when no data has been input.

See Also:
Constant Field Values

A

private static final long A
See Also:
Constant Field Values

B

private static final long B
See Also:
Constant Field Values

C

private static final long C
See Also:
Constant Field Values

T1

private static final long[] T1
S-Box T1.


T2

private static final long[] T2
S-Box T2.


T3

private static final long[] T3
S-Box T3.


T4

private static final long[] T4
S-Box T4.


valid

private static java.lang.Boolean valid

a

private long a

b

private long b

c

private long c
Constructor Detail

Tiger

public Tiger()
Trivial 0-arguments constructor.


Tiger

private Tiger(Tiger that)
Private copying constructor for cloning.

Method Detail

clone

public java.lang.Object clone()
Description copied from interface: IMessageDigest

Returns a clone copy of this instance.

Specified by:
clone in interface IMessageDigest
Specified by:
clone in class BaseHash

selfTest

public boolean selfTest()
Description copied from interface: IMessageDigest

A basic test. Ensures that the digest of a pre-determined message is equal to a known pre-computed value.

Specified by:
selfTest in interface IMessageDigest
Specified by:
selfTest in class BaseHash

padBuffer

protected byte[] padBuffer()
Description copied from class: BaseHash

Returns the byte array to use as padding before completing a hash operation.

Specified by:
padBuffer in class BaseHash

getResult

protected byte[] getResult()
Description copied from class: BaseHash

Constructs the result from the contents of the current context.

Specified by:
getResult in class BaseHash

resetContext

protected void resetContext()
Description copied from class: BaseHash
Resets the instance for future re-use.

Specified by:
resetContext in class BaseHash

transform

protected void transform(byte[] in,
                         int offset)
Description copied from class: BaseHash

The block digest transformation per se.

Specified by:
transform in class BaseHash