import hashlib


def get_consts(method):
    """
    Create hash object and its integer upper bound.
    """
    hasher = getattr(hashlib, method)
    max_plus_one = 2 ** (hasher().digest_size * 8)
    return hasher, max_plus_one