Home » MD5 Command Line Utility [Latest Release: 1.0.1RC]

MD5 Digest Command Line Utility

BUG FIX: Fixed buggy behavior with digest file checking.

Welcome to the dyersWeb MD5 command line utility project page. This utility was written in C. I developed it on Windows, using the MinGW port of GCC. I was able to successfully compile with Borland as well.

What exactly, is MD5?

What's with the questions all of a sudden? Oh, sorry. Anyway, MD5 is the Message-Digest algorithm 5. It was designed by a rather brilliant fellow named Ronald Rivest (who must also be a really cool person, because he likes Python). MD5 is a cryptographic hash, 128 bits long. It is usually outputted as a 32-digit hexadecimal, including for file checking. Since 1991, when it was designed, it has been found to contain some flaws. Namely, it is relatively susceptible to collision, which means the chance that two different types of input, can be hashed as the same output. It's important to note that this is intended to be a one-way hash. There's no implemented way to go from plain text, to digest, and back again. Although MD5 has some weaknesses, it's still a good way to verify the integrity of downloaded files, which may have been either corrupted, or modified by a third party. The likeliness of the latter happening would be extremely remote, unless the site from which you are downloading is well known to handle sensitive data, but even then, rather unlikely. It's more likely that it's useful to detect if a download was corrupted during download. This happens from time to time, and has been frequently noted by those who download Linux distros, which can consist of ISO images near 1 Gb of data.

Dates and memory refreshers from Wikipedia.

What does it do that `md5sum' doesn't?

Not a whole lot. In fact, the only thing I think is better about mine, is that the error reporting for improperly formatted MD5 check files. Basically, mine will tell you if it's a problem with the hex or the file name, but it will also tell you the line and the character, at which an error occurred. You can also switch between simple and verbose checking. In addition to accepting data through stdin, you can pass plain text to the tool by using the `-p' or `--plain-text' switches.

The `-t' and `-b' switches are more aesthetic, and to maintain compatibility with the original md5sum utility. In Windows, I made it so binary reads are always used. On a *nix platform, it doesn't need to be told to handle binary files differently.

Why did you waste your time on someting already written?

Well, that was exceptionally rude of us to insult me through questions you may or may not be asking! Hmmm... just joking! Seriously though, I'm well aware of the existing Unix utilities, and the fact that many are ported to Windows, in fact, I have a lot on my own Windows machine (check out the GnuWin32 project). The reason why is, I am new to C! I have been procrastinating around actually writing something useful. Now that I finally did, I have gained helpful experience in the language. For example, the horrors of handling memory. This is my first "big" project. I reviewed my code a lot, and read trusted, authoritative manuals, and, not to mention getting help from a talented fellow Sveit forum-goer. So I am pretty confident that my code isn't a horrible mess. No SegFault errors, I promise! :-)

Items on TODO

Other Notes

Compiling from source

Some specific notes concerning the source: there aren't many files, so it isn't complicated, nevertheless, there is a Makefile for convenience. The README will have info on usage there. You need to have GNU Make for the Makefile to work. As mentioned above, the GnuWin32 project ports many *nix utilities over to Win32, and it should include GNU Make.

Digital Mars

My Digital Mars C compiler wasn't compiling correctly, because it doesn't seem to support the very cool snprintf function, which is ordinarily located in stdio.h. If your Digital Mars compiler does support this function, then it should work for you. I successfully built the project using CC, GCC and Borland. I haven't tested at all on the Mac, but I see no reason why it shouldn't compile there. If you use a Mac, and successfully compile it, please let me know. :-)

Notes for latest release: 1.0.1RC

Download

Download one of the files from the Source section if you want to check out the code and/or build the project yourself. NOTE: if you are getting the source, please check out the README, as my Makefile conventions may be a bit different from what you're used to.

The binary is precompiled for Win32 users. Generally speaking, *nix users will want the tar.gz tarbell, while Win32 users building form source will want the .ZIP archive.

The listing only shows the latest release. You can still browse older binaries and source distributions.

Valid HTML 4.01 Strict

md5chksum - dyersWeb © 2007. This project is published under the GPL.

Valid CSS!