|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object | +--intradoc.conversion.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. Note: this code is based on the code supplied gotten from Chuck McManis creatd on 5 Oct 1996, Version 1.8 from the URL http://professionals.com/~cmcmanis//java/
| Field Summary | |
byte[] |
m_digestBits
|
boolean |
m_digestValid
|
| Constructor Summary | |
MessageDigest()
|
|
| Method Summary | |
void |
computeDigest(byte[] source)
Complete digest computation on an array of bytes. |
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. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public byte[] m_digestBits
public boolean m_digestValid
| Constructor Detail |
public MessageDigest()
| Method Detail |
public abstract void init()
public abstract void update(byte aValue)
public void update(byte[] input,
int offset,
int len)
public void update(byte[] input)
public abstract void finish()
public void computeDigest(byte[] source)
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
(c) 1996-2005 All rights reserved. Stellent, Inc. |