|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.arsdigita.acs.util.crypt.MessageDigest
The MessageDigest class defines a general class for computing digest functions. It is defined as an abstract class that is subclassed by message digest algorithms. In this way the PKCS classes can be built to take a MessageDigest object without needing to know what 'kind' of message digest they are computing. This class defines the standard functions that all message digest algorithms share, and ways to put all Java fundamental types into the digest. It does not define methods for digestifying either arbitrary objects or arrays of objects however.
| Field Summary | |
static java.lang.String |
cvsId
|
byte[] |
digestBits
the actual digest bits. |
boolean |
digestValid
status of the digest |
| Constructor Summary | |
MessageDigest()
|
|
| Method Summary | |
static void |
benchmark(MessageDigest md)
|
void |
computeDigest(byte[] source)
Complete digest computation on an array of bytes. |
void |
computeDigest(java.io.InputStream in)
|
abstract void |
finish()
Perform the final computations and cleanup. |
abstract java.lang.String |
getAlg()
Return a string that represents the algorithim of this message digest. |
abstract void |
init()
This function is used to initialize any internal digest variables or parameters. |
boolean |
isEqual(byte[] otherDigest)
Non static version that compares this digest to one passed. |
static boolean |
isEqual(byte[] digesta,
byte[] digestb)
Compare two digests for equality. |
java.lang.String |
toString()
Return a string representation of this object. |
void |
update(boolean aValue)
Add a boolean to the digest. |
abstract void |
update(byte aValue)
The basic unit of digestifying is the byte. |
void |
update(byte[] input)
Add an array of bytes to the digest. |
void |
update(byte[] input,
int offset,
int len)
Add specific bytes to the digest. |
void |
update(java.io.InputStream in)
Read a stream and update a digest until the stream sends an EOF. |
void |
update(int aValue)
Add an integer value to the digest. |
void |
update(int[] input)
Add an array of integers to the digest. |
void |
update(long aValue)
Add a long to the digest. |
void |
update(long[] input)
Add an array of longs to the digest. |
void |
update(short aValue)
Add a short value to the digest. |
void |
update(short[] input)
Add an array of shorts to the digest. |
void |
update(java.lang.String input)
Add the bytes in the String 'input' to the current digest. |
void |
updateASCII(java.lang.String input)
Treat the string as a sequence of ISO-Latin1 (8 bit) characters. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String cvsId
public byte[] digestBits
public boolean digestValid
| Constructor Detail |
public MessageDigest()
| Method Detail |
public abstract void init()
public abstract void update(byte aValue)
public void update(boolean aValue)
public void update(short aValue)
public void update(int aValue)
public void update(long aValue)
public void update(byte[] input,
int offset,
int len)
public void update(byte[] input)
public void update(short[] input)
public void update(int[] input)
public void update(long[] input)
public void update(java.lang.String input)
public void updateASCII(java.lang.String input)
public void update(java.io.InputStream in)
public abstract void finish()
public void computeDigest(byte[] source)
public void computeDigest(java.io.InputStream in)
public java.lang.String toString()
toString in class java.lang.Object
public static boolean isEqual(byte[] digesta,
byte[] digestb)
public boolean isEqual(byte[] otherDigest)
public abstract java.lang.String getAlg()
public static void benchmark(MessageDigest md)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||