Generate Hash using hashlib