Fixing hashlib implementation.