MD4 (Message Digest Algorithm 4) is a cryptographic hash function that was designed by Professor Ronald Rivest of MIT in 1990 and specified in RFC 1320.
It's digest length is 128 bits. In 1991 MD4 was shown to be vulnerable to collision attacks and around 2004 a very effecient collision attack was found (on the order of a few microseconds). Since it has been shown to be vulnerable to attack, it should not be used in new designs. It is provided for compatibility with previous protocols and applications which specify it's use. The MD4 of either a file (both binary and text) or a buffer can be calculated.
- See Also
-
RFC-1320
- Parameters
-
pInData | [ in ] Pointer to the data to calculate the MD4 over. |
base64Encode | [ in ] Flag indicating whether the MD4 should be encoded in base64 (otherwise it is binary string) |
pOutData | [ in ] Pointer to where to copy the MD4 digest value. |
- Returns
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R::eInvalidArg | One of the parameters is NULL. |
P6R::eNotFound | File data source does not exist. |
P6R::eIoError | Write to file data sink failed. |
P6R::eTooSmall | The buffer data sink is too small to contain the generated value. |
P6R::eTooBig/td> | Internal error |
P6R::eFailAndException | The digest calculation failed. Exception record provides detailed error info. |