org.restlet.data
Class Digest

java.lang.Object
  extended by org.restlet.data.Digest

public class Digest
extends java.lang.Object

Describes a representation digest to ensure its integrity when sent over the network.

Author:
Jerome Louvel

Field Summary
static java.lang.String ALGORITHM_MD2
          Digest algorightm defined in RFC 1319.
static java.lang.String ALGORITHM_MD5
          Digest algorightm defined in RFC 1321.
static java.lang.String ALGORITHM_SHA_1
          Digest algorightm defined in Secure Hash Standard, NIST FIPS 180-1.
static java.lang.String ALGORITHM_SHA_256
          NIST approved digest algorithm from SHA-2 family.
static java.lang.String ALGORITHM_SHA_384
          NIST approved digest algorithm from SHA-2 family.
static java.lang.String ALGORITHM_SHA_512
          NIST approved digest algorithm from SHA-2 family.
 
Constructor Summary
Digest(byte[] value)
          Constructor using the MD5 algorithm by default.
Digest(java.lang.String algorithm, byte[] value)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAlgorithm()
          Returns the digest algorithm.
 byte[] getValue()
          Returns the digest value.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALGORITHM_MD2

public static final java.lang.String ALGORITHM_MD2
Digest algorightm defined in RFC 1319.

See Also:
Constant Field Values

ALGORITHM_MD5

public static final java.lang.String ALGORITHM_MD5
Digest algorightm defined in RFC 1321.

See Also:
Constant Field Values

ALGORITHM_SHA_1

public static final java.lang.String ALGORITHM_SHA_1
Digest algorightm defined in Secure Hash Standard, NIST FIPS 180-1.

See Also:
Constant Field Values

ALGORITHM_SHA_256

public static final java.lang.String ALGORITHM_SHA_256
NIST approved digest algorithm from SHA-2 family.

See Also:
Constant Field Values

ALGORITHM_SHA_384

public static final java.lang.String ALGORITHM_SHA_384
NIST approved digest algorithm from SHA-2 family.

See Also:
Constant Field Values

ALGORITHM_SHA_512

public static final java.lang.String ALGORITHM_SHA_512
NIST approved digest algorithm from SHA-2 family.

See Also:
Constant Field Values
Constructor Detail

Digest

public Digest(byte[] value)
Constructor using the MD5 algorithm by default.

Parameters:
value - The digest value.

Digest

public Digest(java.lang.String algorithm,
              byte[] value)
Constructor.

Parameters:
algorithm - The digest algorithm.
value - The digest value.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getAlgorithm

public java.lang.String getAlgorithm()
Returns the digest algorithm.

Returns:
The digest algorithm.

getValue

public byte[] getValue()
Returns the digest value.

Returns:
The digest value.


Copyright © 2005-2008 Noelios Technologies.