|
QuickHash Library |
API |
|
MD4 API Overview
MD4 API assists you in generating MD4
message digests.
MD4 message digests can be generated in two modes:
accumulative and non-accumulative.
The accumulative mode is applied when the data for
which the digest is calculated (data) represents one or more continuous
memory block(s) or when the data is created at runtime in many steps (for
instance, when reading a file).
Non-accumulative mode can be applied when the data
represents only one continuous memory block.
Note. When the data represents just one
continuous memory block, both methods can be applied.
To generate the message digest in the accumulative mode,
perform the following:
-
Allocate at least SLC_MD4_CONTEXTSIZE bytes
for the
context.
-
Call the SL_MD4_Init function to
initialize the
context.
-
Call the
SL_MD4_Update function for each continuous memory block of data
to perform the calculations.
Note. You can use
SL_MD4_UpdateStr function
(instead of
SL_MD4_Update
function)
if the data represents a null-terminated string.
-
Call the
SL_MD4_Final
or the
SL_MD4_FinalHex function
to obtain the message digest.
Note. Call the
SL_MD4_FinalHex
function when you need to retrieve the hexadecimal string representation of the
message digest.
To generate the message digest in the non-accumulative mode,
perform the following:
MD4 API Functions
|
Useful Links | HashCalc
Samples MD4 message digest generation for a file
MD4 message digest generation for a string
|