An AES Encryption/Decryption program. This uses the standard 128 bit aes encryption.
Make sure you have Numpy installed. If you're unsure how to do that go here: https://scipy.org/install.html
Download the aes_encryption.py. For global imports run these commands:
python3
import sys
print(sys.path)
You should receive a path to something like:
'/usr/dylan/env/lib/python3.6/site-packages'
Drop aes_encryption.py into this. Now you should be able to import it just like anything else.
NOTE: This will automatically handle any conversions of strings, as well as the 16 byte limit of AES is handled as well within. So the text can be greater than 16bytes the encryption and decryption will handle that. The key MUST be 16 bytes however.
from aes_encryption import aes
inputText = sys.argv[1]
aesBody = aes("0123456789123456")
cypherText = aesBody.encrypt(inputText)
print("Encrypted Text: ", cypherText)
plaintext = aesBody.decrypt(cypherText)
print("Decrypted Text: ", plaintext)
Honestly, I won't be working on this too much as it was made as a working test for my Capstone Project. However, if you wish make changes go for it and I will review them when I have time!