how to calculate the md5 of multiple directories

Somtime you would like to know if a file got changed while you were not looking. I have some website that got hacked and I decided that I would be pro active in cheking if a file was changed and I used this little command in one of my script. I have used other tools like diff to compare the results of the md5sum. I will probably post about it a little later on.

tar c foldernamegoeshere | md5sum