Some changes to hashlib to make for better stl compatibility