edu.berkeley.psi.tagged.api
Class Digest
java.lang.Object
edu.berkeley.psi.tagged.api.Tagged
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.
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 |
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
Digest
public Digest()
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()