changes md5 module for more efficient md5hashing

tackles #1597