def hashfunc_from_hashlib(hash_method, input_file):
    """Get a hash digest value from a large input file

    Arguments:
        hash_method (function): specific hashlib hashing algorithm
        input_file (str): path to input file
    
    Returns:
        (str): hash algorithm digest of file contents as a hex string
    """
    hashfunc = hash_method()
    with open(input_file, 'rb') as f:
        for chunk in iter(lambda : f.read(4096), b''):
            hashfunc.update(chunk)
    return hashfunc.hexdigest()
