![](../../Home/Icons/Home.gif)
![](../icons/UpCNM.gif)
![](../icons/CNMContext.gif)
![](../../Home/Icons/Search.gif)
Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TMessageDigest
Inherited By:
None.
Purpose:
The MD4 message digest algorithm is based on the specification by R. Rivest and S. Dusse. The MD4 algorithm takes an input message of arbitrary length and produces as output a message digest of the input. It is conjectured that it is computationally infeasible to produce two messages that result in the same MD4 digest. The algorithm is designed to be fast and can be coded quite compactly. In addition, the code and algorithm have been placed in the public domain.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Member Function: TMD4::TMD4
- TMD4 ()
- TMD4 (TPrimitiveTypeArray < unsigned char >& message)
- TMD4 (const TMD4 &)
Interface Category:
API.
Purpose:
- Default constructor.
- Standard constructor use to create a digest.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and clients that want to use the streaming digest (Write & Flush) member functions.
- Call this function directly.
- Called to copy an object.
Parameters:
- Takes no parameters.
- TPrimitiveTypeArray < unsigned char >& message -The array to be digested.
- const TMD4 & -The object to copy.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMD4::~TMD4
virtual ~ TMD4 ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMD4::operator=
TMD4 & operator =(const TMD4 &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object.
Parameters:
- const TMD4 & -The object to copy.
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMD4::operator>>=
TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMD4::operator<<=
TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws TInvalidVersionError if the version of the object is not recognized.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMD4::Write
virtual void Write (TPrimitiveTypeArray < unsigned char >& message)
Interface Category:
API.
Purpose:
Updates the message digest to include the digest of the specified message. This member function is useful for digesting very large messages where it would be impractical to present the whole message in one contiguous in-memory array. For example, each line in a file could be passed to Write individually without having to load the file into an in-memory array.
Calling Context:
Called by the client during a digest streaming operation.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMD4::Flush
virtual void Flush ()
Interface Category:
API.
Purpose:
Signals the end of the message and causes the message digest algorithm to post the message digest to the TMessageDigest base class. Flush is only required if the default constructor was used in conjunction with the Write member function. The TMD#(message) constructors perform the Flush operation automatically during construction.
Calling Context:
Called by the client at the end of a digest stream operation.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TMD4::GetDigestType
virtual void GetDigestType (TStandardText & digestType) const
Interface Category:
API.
Purpose:
Gets a TStandardText object that uniquely identifies the underlying message digest algorithm. This member function is designed to offer RTTI-like services until RTTI is in place.
Calling Context:
Called by the holder of a TMD4-based object that needs to know the identity of the underlying algorithm.
Parameters:
- TStandardText & digestType -The storage where the identifier is copied.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.