Here is a completion function for the md5sum tool (the version included with the dpkg project). Let me know if there is any other information I should provide.