Also, it might be a good idea to limit the number of bytes read at a time, to make sure this won't barf on low-end hardware like the Raspberry Pi. Some things I found on googling: http://stackoverflow.com/questions/1131220/get-md5-hash-of-big-files-in-python