|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.berkeley.psi.tagged.api.Tagged edu.berkeley.psi.tagged.api.Digest edu.berkeley.psi.tagged.api.SHA1Digest
public class SHA1Digest
Represents a SHA-1 hash digest result. It will normally be XDR-serialized as a 4-byte tag followed by a 20-byte hash value.
Field Summary | |
---|---|
protected static int |
SHA1_LENGTH
The expected size of a SHA-1 digest |
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 | |
---|---|
SHA1Digest(byte[] data)
Create a Digest with a shared byte[] buffer |
Method Summary | |
---|---|
java.lang.String |
getAlgorithm()
Return the algorithm name for MessageDigest |
int |
getAlgorithmId()
An integer index for the algorithm |
(package private) static Digest |
newInstance()
Create an unintialized SHA1Digest object for use by xdrDecode(). |
static Digest |
newInstance(byte[] data)
|
static int |
staticTag()
The class tag used for XdrDecode disambiguation. |
void |
xdrDecode(XdrDecodingStream xdr)
Deserialize a SHA1Digest from the XdrDecodingStream |
void |
xdrEncode(XdrEncodingStream xdr)
Serialize a SHA1Digest to a XdrEncodingStream |
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 |
---|
protected static final int SHA1_LENGTH
Constructor Detail |
---|
SHA1Digest(byte[] data)
Method Detail |
---|
public java.lang.String getAlgorithm()
getAlgorithm
in class Digest
public int getAlgorithmId()
getAlgorithmId
in class Digest
public static int staticTag()
public static Digest newInstance(byte[] data)
public void xdrDecode(XdrDecodingStream xdr) throws OncRpcException, java.io.IOException
xdr
- XDR stream from which decoded information is retrieved.
OncRpcException
- if an ONC/RPC error occurs.
java.io.IOException
- if an I/O error occurs.public void xdrEncode(XdrEncodingStream xdr) throws OncRpcException, java.io.IOException
xdr
- XDR stream to which information is sent for encoding.
OncRpcException
- if an ONC/RPC error occurs.
java.io.IOException
- if an I/O error occurs.static Digest newInstance()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |