Fallback to sha, md5 from hashlib to fix deprecation errors