This is class which generates the Message Digest using Various algorithms. It gives support to
various algorithms such as MD4 - both 128 bits and 256 bits, MD5, RIPEMD-128, RIPEMD-160, RIPEMD-256,
RIPEMD-320, SHA-1, SHA-256, SHA-384, SHA-512, HAVAL SERIES and BASE 64 Encoding and Decoding.
Using the code
This one program can be used for various purpose
- You can create the .dll file and can use it
- You can create the .exe file and use it as Console Based Utility
For creating the Console based utility
- Include all the files except the MessageDigest.def file
- Compile Main.cpp in VC++ 6.0 and then run it
Note:- Please remove all the files from the build expect the Main.cpp while you are
creating the Console based utility.
Help is included in the Main.cpp or you can run the .exe file with parameters as (NULL, -?, -help)
For creating the dll file
Include the file MessageDigest.def file and remove the main.cpp, main.h, system.h files. Then compile the "Export.cpp" and build the MessageDigest.dll
FILE * OutFileStream;
LONG Expected_FileSize(ULONGLONG &);
VOID BASE64_Encode_Update(PCHAR,ULONG &);
Signature_Context(UCHAR = MD_5, UCHAR = 0); ~Signature_Context(VOID);
UCHAR = 3,UCHAR = 0,SHORT = 0,
LONG = NULL,LONG = NULL);
VOID Signature_Update(PCHAR,ULONG &);
Points of Interest
- Special Logic has been developed for Base 64 encoding and decoding
- A some what different implementation for calculating the Message Digest
- In all 16 Message Digest algorithms are supported
- Given support to MD4 256 bit algorithm, which require 2 copies of code
- Implementation of
AppendChunk method which will take in some extra input while
processing (Not in Console Based)
- The program gives back the progress of transformation (Not in Console Based)
Special Logic used for BASE 64 Encoding and Decoding.
I had used the concept of bit datatype. Check out the cool code and also the speed which i had
reduced for calculation of BASE 64 Encoding and Decoding
I wonder "Why people use the shifting logic when they had Bit Data type Which gradually
increases the Execution time"
An efficient use of CALLBACK from C++
Lastly, I would like to thank Respected Sir, Shyam R. Soni for his priceless guidance
through out this project. It would be never be possible without him.
I would also like to thanks Dominik Reichl for his very valuable tips and guidance