<commit_before>from TPM import TPM



tractor = TPM("../keys/robot-server.pub", "../keys/tractor01.priv")
server = TPM("../keys/tractor01.pub", "../keys/robot-server.priv")


#Generate a session key on the server to send to the tractor
tractors_session_key = server.pki_encrypt(server.session_key)

print "Session: "+tractors_session_key

for i in range(10):
    t = tractor.encrypt("hello server")
    print "Ciphered: "+t
    print "decrypted: "+ tractor.decrypt(t)

<commit_msg>Added test script to demonstrate integration of TPM.<commit_after>from TPM import TPM



tractor = TPM("../keys/robot-server.pub", "../keys/tractor01.priv")
server = TPM("../keys/tractor01.pub", "../keys/robot-server.priv")


#Generate a session key on the server to send to the tractor
session_key = server.pki_encrypt(server.session_key)

# Send David the session key

#David initialized his TPM with the session key.
my_key = tractor.pki_decrypt(session_key)
tractor.session_key = my_key

print "Session: "+tractor.session_key

for i in range(10):
    t = tractor.encrypt("hello server")
    print "Ciphered: "+t
    print "decrypted: "+ server.decrypt(t)

    s = server.encrypt("Hello david.")
    print tractor.decrypt(s)


{'fraction_non_alphanumeric': 0.1347107438016529, 'fraction_numerical': 0.009917355371900827, 'mean_word_length': 4.153191489361702, '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': '5990005', 'n_tokens_mistral': 426, 'n_tokens_neox': 404, 'n_words': 109}