edu.berkeley.psi.tagged.api
Class MD5Digest

java.lang.Object
  extended by edu.berkeley.psi.tagged.api.Tagged
      extended by edu.berkeley.psi.tagged.api.Digest
          extended by edu.berkeley.psi.tagged.api.MD5Digest
All Implemented Interfaces:
TaggedIF, XdrAble

public class MD5Digest
extends Digest

Represents a MD5 hash digest result. It will normally be XDR-serialized as a 4-byte tag followed by a 16-byte hash value.


Field Summary
protected static int MD5_LENGTH
           
 
Fields inherited from class edu.berkeley.psi.tagged.api.Digest
data, DEFAULT_ALGORITHM, DEFAULT_ALGORITHM_ID, MD2, MD5, SHA1, SHA256, SHA384, SHA512
 
Fields inherited from class edu.berkeley.psi.tagged.api.Tagged
classes, initLock
 
Constructor Summary
MD5Digest(byte[] data)
           
 
Method Summary
 java.lang.String getAlgorithm()
           
 int getAlgorithmId()
           
(package private) static Digest newInstance()
           
static Digest newInstance(byte[] data)
           
static int staticTag()
           
 void xdrDecode(XdrDecodingStream xdr)
          Decodes -- that is: deserializes -- an object from a XDR stream in compliance to RFC 1832.
 void xdrEncode(XdrEncodingStream xdr)
          Encodes -- that is: serializes -- an object into a XDR stream in compliance to RFC 1832.
 
Methods inherited from class edu.berkeley.psi.tagged.api.Digest
bytes, factory, getAlgorithm, getAlgorithmId, getDigestLength
 
Methods inherited from class edu.berkeley.psi.tagged.api.Tagged
addClass, addClass, digest, digest, digestWith, get, getBody, getTag, newInstance, put, put, putBody, putTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MD5_LENGTH

protected static final int MD5_LENGTH
See Also:
Constant Field Values
Constructor Detail

MD5Digest

MD5Digest(byte[] data)
Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Specified by:
getAlgorithm in class Digest

staticTag

public static int staticTag()

getAlgorithmId

public int getAlgorithmId()
Specified by:
getAlgorithmId in class Digest

newInstance

public static Digest newInstance(byte[] data)

xdrDecode

public void xdrDecode(XdrDecodingStream xdr)
               throws OncRpcException,
                      java.io.IOException
Description copied from interface: XdrAble
Decodes -- that is: deserializes -- an object from a XDR stream in compliance to RFC 1832.

Parameters:
xdr - XDR stream from which decoded information is retrieved.
Throws:
OncRpcException - if an ONC/RPC error occurs.
java.io.IOException - if an I/O error occurs.

xdrEncode

public void xdrEncode(XdrEncodingStream xdr)
               throws OncRpcException,
                      java.io.IOException
Description copied from interface: XdrAble
Encodes -- that is: serializes -- an object into a XDR stream in compliance to RFC 1832.

Parameters:
xdr - XDR stream to which information is sent for encoding.
Throws:
OncRpcException - if an ONC/RPC error occurs.
java.io.IOException - if an I/O error occurs.

newInstance

static Digest newInstance()