import string
import secrets


def __scatter_padding(word_count, pad_length, digits, punctuation, ignored_symbols):
    """
    Randomly decides where to add padding and which characters to use
    :param word_count: Number of words in passphrase
    :param pad_length: Number of characters to use for padding
    :param digits: True to use digits in padding
    :param punctuation: True to use punctuation in padding
    :param ignored_symbols: str containing all characters to ignore during padding generation
    :return: A tuple containing the padding placements and the size of the character pool used to pad
    """
    char_pool = ''
    if digits:
        char_pool += string.digits
    if punctuation:
        char_pool += string.punctuation

    char_list = [char for char in char_pool if char not in ignored_symbols]
    indexes = [index for index in range(word_count + 1)]
    placements = {}
    for _ in range(pad_length):
        idx = secrets.choice(indexes)

        if idx not in placements:
            placements.update({idx: [secrets.choice(char_list)]})
        else:
            placements[idx].append(secrets.choice(char_list))

    return placements, len(char_list)