edu.berkeley.psi.tagged.api
Class Digest

java.lang.Object
  extended by edu.berkeley.psi.tagged.api.Tagged
      extended by edu.berkeley.psi.tagged.api.Digest
All Implemented Interfaces:
TaggedIF, XdrAble
Direct Known Subclasses:
MD2Digest, MD5Digest, SHA1Digest, SHA256Digest, SHA384Digest, SHA512Digest

public abstract class Digest
extends Tagged

Represents the results of a cryptographic hash algorithm applied to the serialization (using XDR) of a Tagged object. For verification purposes, the algorithm used is encoded in the tag type.


Field Summary
protected  byte[] data
           
static java.lang.String DEFAULT_ALGORITHM
           
static int DEFAULT_ALGORITHM_ID
           
static int MD2
           
static int MD5
           
static int SHA1
           
static int SHA256
           
static int SHA384
           
static int SHA512
           
 
Fields inherited from class edu.berkeley.psi.tagged.api.Tagged
classes, initLock
 
Constructor Summary
Digest()
           
 
Method Summary
 byte[] bytes()
           
 DigestFactory factory()
           
abstract  java.lang.String getAlgorithm()
           
static java.lang.String getAlgorithm(int id)
           
abstract  int getAlgorithmId()
           
static int getAlgorithmId(java.lang.String alg)
           
 int getDigestLength()
           
 
Methods inherited from class edu.berkeley.psi.tagged.api.Tagged
addClass, addClass, digest, digest, digestWith, get, getBody, getTag, newInstance, newInstance, put, put, putBody, putTag, staticTag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.acplt.oncrpc.XdrAble
xdrDecode, xdrEncode
 

Field Detail

data

protected byte[] data

SHA1

public static final int SHA1
See Also:
Constant Field Values

SHA256

public static final int SHA256
See Also:
Constant Field Values

SHA384

public static final int SHA384
See Also:
Constant Field Values

SHA512

public static final int SHA512
See Also:
Constant Field Values

MD5

public static final int MD5
See Also:
Constant Field Values

MD2

public static final int MD2
See Also:
Constant Field Values

DEFAULT_ALGORITHM_ID

public static final int DEFAULT_ALGORITHM_ID
See Also:
Constant Field Values

DEFAULT_ALGORITHM

public static final java.lang.String DEFAULT_ALGORITHM
See Also:
Constant Field Values
Constructor Detail

Digest

public Digest()
Method Detail

getAlgorithm

public abstract java.lang.String getAlgorithm()
                                       throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getAlgorithmId

public abstract int getAlgorithmId()
                            throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getAlgorithm

public static final java.lang.String getAlgorithm(int id)
                                           throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getAlgorithmId

public static final int getAlgorithmId(java.lang.String alg)
                                throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

bytes

public final byte[] bytes()

factory

public final DigestFactory factory()
                            throws java.security.NoSuchAlgorithmException
Throws:
java.security.NoSuchAlgorithmException

getDigestLength

public int getDigestLength()