org.sf.rhash
Enum HashType

java.lang.Object
  extended by java.lang.Enum<HashType>
      extended by org.sf.rhash.HashType
All Implemented Interfaces:
Serializable, Comparable<HashType>

public enum HashType
extends Enum<HashType>

Type of hashing algorithm. Supported algorithms are MD4, MD5, SHA1/SHA2, Tiger, DC++ TTH, BitTorrent BTIH, AICH, EDonkey 2000 hash, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R 256/512, Whirlpool and Snefru-128/256.


Enum Constant Summary
AICH
          eMule AICH.
BTIH
          BitTorrent info hash.
CRC32
          CRC32 checksum.
ED2K
          EDonkey 2000 hash.
EDONR256
          EDON-R 256.
EDONR512
          EDON-R 512.
GOST
          GOST R 34.11-94.
GOST_CRYPTOPRO
           
HAS160
          HAS-160 hash.
MD4
          MD4 hash.
MD5
          MD5 hash.
RIPEMD160
          RIPEMD-160 hash.
SHA1
          SHA-1 hash.
SHA224
          SHA-224 hash.
SHA256
          SHA-256 hash.
SHA384
          SHA-384 hash.
SHA512
          SHA-512 hash.
SNEFRU128
          Snefru-128 hash.
SNEFRU256
          Snefru-256 hash.
TIGER
          Tiger hash.
TTH
          Tiger tree hash
WHIRLPOOL
          Whirlpool hash.
 
Method Summary
 int getDigestSize()
          Returns size of binary digest for this type.
static HashType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HashType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CRC32

public static final HashType CRC32
CRC32 checksum.


MD4

public static final HashType MD4
MD4 hash.


MD5

public static final HashType MD5
MD5 hash.


SHA1

public static final HashType SHA1
SHA-1 hash.


TIGER

public static final HashType TIGER
Tiger hash.


TTH

public static final HashType TTH
Tiger tree hash


BTIH

public static final HashType BTIH
BitTorrent info hash.


ED2K

public static final HashType ED2K
EDonkey 2000 hash.


AICH

public static final HashType AICH
eMule AICH.


WHIRLPOOL

public static final HashType WHIRLPOOL
Whirlpool hash.


RIPEMD160

public static final HashType RIPEMD160
RIPEMD-160 hash.


GOST

public static final HashType GOST
GOST R 34.11-94.


GOST_CRYPTOPRO

public static final HashType GOST_CRYPTOPRO

HAS160

public static final HashType HAS160
HAS-160 hash.


SNEFRU128

public static final HashType SNEFRU128
Snefru-128 hash.


SNEFRU256

public static final HashType SNEFRU256
Snefru-256 hash.


SHA224

public static final HashType SHA224
SHA-224 hash.


SHA256

public static final HashType SHA256
SHA-256 hash.


SHA384

public static final HashType SHA384
SHA-384 hash.


SHA512

public static final HashType SHA512
SHA-512 hash.


EDONR256

public static final HashType EDONR256
EDON-R 256.


EDONR512

public static final HashType EDONR512
EDON-R 512.

Method Detail

values

public static HashType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (HashType c : HashType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static HashType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getDigestSize

public int getDigestSize()
Returns size of binary digest for this type.

Returns:
size of binary digest, in bytes