<commit_before>import base64
import functools
import json
import sys

from Crypto.Cipher import AES
from Crypto.Hash import HMAC, SHA256
from Crypto.Protocol.KDF import PBKDF2
from Crypto import Random


BAD_HMAC = 1
BAD_ARGS = 2


class CryptOptions(object):
    def __init__(self, password, salt=None, iterations=100000):
        self.password = password
        self.salt = salt
        self.iterations = iterations


def make_keys(password, salt=None, iterations=100000):
    """Generates two 128-bit keys from the given password using
    PBKDF2-SHA256.
    We use PBKDF2-SHA256 because we want the native output of PBKDF2 to be
    256 bits. If we stayed at the default of PBKDF2-SHA1, then the entire<commit_msg>Changed CryptOption from class to NamedTuple<commit_after>import base64
import functools
import json
import sys
from collections import namedtuple

from Crypto.Cipher import AES
from Crypto.Hash import HMAC, SHA256
from Crypto.Protocol.KDF import PBKDF2
from Crypto import Random


BAD_HMAC = 1
BAD_ARGS = 2


CryptOptions = namedtuple("CryptOptions", ["password", "salt", "iterations"])


def make_keys(password, salt=None, iterations=100000):
    """Generates two 128-bit keys from the given password using
    PBKDF2-SHA256.
    We use PBKDF2-SHA256 because we want the native output of PBKDF2 to be
    256 bits. If we stayed at the default of PBKDF2-SHA1, then the entire
{'fraction_non_alphanumeric': 0.06236559139784946, 'fraction_numerical': 0.04874551971326165, 'mean_word_length': 4.189591078066915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2532506', 'n_tokens_mistral': 489, 'n_tokens_neox': 417, 'n_words': 164}