<commit_before>import hmac, hashlib, subprocess, random
import gnupg
import config

BITS_IN_RANDOM_ID = 256
HASH_FUNCTION = hashlib.sha256
GPG_KEY_TYPE = "RSA"
GPG_KEY_LENGTH = "4096"

class CryptoException(Exception): pass

def genrandomid():
    return hex(random.getrandbits(BITS_IN_RANDOM_ID))[2:-1]

def shash(s):
    """<commit_msg>switch to xkcd code names<commit_after>import hmac, hashlib, subprocess, random
import gnupg
import config

WORDS_IN_RANDOM_ID = 2
WORD_LIST = 'wordlist'
HASH_FUNCTION = hashlib.sha256
GPG_KEY_TYPE = "RSA"
GPG_KEY_LENGTH = "4096"

class CryptoException(Exception): pass

words = file(WORD_LIST).read().split('\n')
def genrandomid():
    return ' '.join(random.choice(words) for x in range(WORDS_IN_RANDOM_ID))

def shash(s):
    """
{'fraction_non_alphanumeric': 0.11428571428571428, 'fraction_numerical': 0.025974025974025976, 'mean_word_length': 6.073394495412844, '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': '5337669', 'n_tokens_mistral': 303, 'n_tokens_neox': 291, 'n_words': 64}