Thanks for the info. I have found more information about MD4 on www.openssl.org:
MD4() computes the MD4 message digest of the n bytes at d and places it in md
I don't know what the "unsigned char" is at the beginning of the first line of code in the question - I guess some other output but I don't need it whatever it is.
The length of MD is always 16 bytes
the length of d is up to 14 bytes
and n therefore has a maximum of 14
Also, could you explain the Marshall class as I havn't used it before and don't know exactly how it works.
Thanks
Main Topics
Browse All Topics





by: AlexFMPosted on 2005-02-16 at 11:48:31ID: 13327883
unsigned char *MD4(const unsigned char *d, unsigned long n, unsigned char *md);
should be:
Declare Function MD4 Lib "libeay32" Alias "MD4" (ByVal d as IntPtr, ByVal n As Long, ByVal md as IntPtr) As IntPtr
Marshal class should be used to allocate, write and read unmanaged memory blocks for MD4 function. You need to provide more information about MD4 funcion: how does it use memory blocks d and md, what is input and output, what is their length and what is char* pointer returned by this function.