Replaced hashcompat with hashlib