<commit_before>"""
cryptography.py
Author: <your name here>
Credit: <list sources used, if any>

Assignment:

Write and submit a program that encrypts and decrypts user data.

See the detailed requirements at https://github.com/HHS-IntroProgramming/Cryptography/blob/master/README.md
"""
associations = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,:;'\"/\\<>(){}[]-=_+?!"
counter = 0
lisas = []
while counter < 84:
    lisas.append(associations[counter])
    counter+=1
aslis = list(range(0,86))
lis = list(zip(aslis, lisas))
counter1 = 0
def encrypt(msgin, kyin):
    counter1 = 0
    counter1 = int(counter1)
    laenge = int(len(msgin))
    msglis = []
    msglis = list(msglis)
    eqmsg = []
    while counter1 < laenge:
        msglis = list(msglis)
        msglis.append(msgin[counter1])
        counter1 += 1
        eqmsg.append(associations.find(msgin[counter1-1]))
    #edit lenght of the ky
    laengeky(laenge, kyin)
    
def kyanpassen(msglaenge, kywrk1):
    laengeky = int(len(kywrk1))
    kywrk = kywrk1
    if laengeky < msglaenge+1:
        laengekywrk = int(len(kywrk))
        while laengekywrk < msglaenge:
            kywrk = kywrk + kyin
            laengekywrk = int(len(kywrk))
        laengekywrk = int(len(kywrk))
        if laengekywrk > msglaenge:
            while laengekywrk > msglaenge:
                kywrk = kywrk[:-1]
                laengekywrk = int(len(kywrk))
        #eqmsg.append(associations.find(msgin[counter1-1]))
    #print(msglis) its the msg in a list
    #print(eqmsg) its the msg in the eq in a list
    do = False

do = False
while do == False:
    befehl = str.lower(input("Enter e to encrypt, d to decrypt, or q to quit: "))
    if befehl == 'e':
        do = True
        msg = str(input("Message: "))
        ky = str(input("Key: "))
        encrypt(msg, ky)
        do = False
    elif befehl == 'd':
        do = True
        msg = str(input("Message: "))
        ky = str(input("Key: "))<commit_msg>Updated from Brython Server: 10/6/2016 1:37:50 PM<commit_after>"""
cryptography.py
Author: <your name here>
Credit: <list sources used, if any>

Assignment:

Write and submit a program that encrypts and decrypts user data.

See the detailed requirements at https://github.com/HHS-IntroProgramming/Cryptography/blob/master/README.md
"""
associations = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,:;'\"/\\<>(){}[]-=_+?!"
counter = 0
lisas = []
while counter < 84:
    lisas.append(associations[counter])
    counter+=1
aslis = list(range(0,86))
lis = list(zip(aslis, lisas))
counter1 = 0
def encrypt(msgin, kyin):
    counter1 = 0
    counter1 = int(counter1)
    laenge = int(len(msgin))
    msglis = []
    eqmsg = []
    while counter1 < laenge:
        msglis.append(msgin[counter1])
        eqmsg.append(associations.find(msgin[counter1]))
        counter1 += 1
    #edit lenght of the ky
    kyanpassen(laenge, kyin)
    # here I need kydone
    kylis = []
    eqky = []
    counter2 = 0
    laengekydone = int(len(kydone))
    while counter2 < laengekydone:
        kylis.append(kydone[counter2])
        eqky.append(associations.find(kydone[counter2]))
        counter2 += 1
        
    
    
def kyanpassen(msglaenge, kywrk1):
    
    laengeky = int(len(kywrk1))
    kywrk = kywrk1
    if laengeky < msglaenge+1:
        laengekywrk = int(len(kywrk))
        while laengekywrk < msglaenge:
            kywrk = kywrk + kywrk1
            laengekywrk = int(len(kywrk))
        laengekywrk = int(len(kywrk))
        if laengekywrk > msglaenge:
            while laengekywrk > msglaenge:
                kywrk = kywrk[:-1]
                laengekywrk = int(len(kywrk))
    kywrk = kydone
    return kydone
    do = False

do = False
while do == False:
    befehl = str.lower(input("Enter e to encrypt, d to decrypt, or q to quit: "))
    if befehl == 'e':
        do = True
        msg = str(input("Message: "))
        ky = str(input("Key: "))
        encrypt(msg, ky)
        do = False
    elif befehl == 'd':
        do = True
        msg = str(input("Message: "))
        ky = str(input("Key: "))
{'fraction_non_alphanumeric': 0.1272815770260404, 'fraction_numerical': 0.021659771233876857, 'mean_word_length': 2.6052631578947367, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 13, 'https://': 2, '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': '57505', 'n_tokens_mistral': 1611, 'n_tokens_neox': 1506, 'n_words': 339}