Use hashlib instead of md5 which is deprecated