replace hashcompat to hashlib