Recently I was testing an Web App that made use of AES encryption to generate tokens. I put together my own proof of concept code to generate the tokens and to decrypt the tokens using pycrypto. The code reads in strings from a separate file and then uses the Key and IV with the AES algorithm to generate a AES encrypted/base64 encoded string. The method was a port of Microsoft .net standard written in VB. Im sure the code is a copy from somewhere with a few amendments so sorry if I stole your code! ;-P
Obviously for this to work you need the Key which was 16 bits long and pretty much unbreakable in the time I had but it was retrievable in other ways. Anyway just wanted to post this so that I was top of the leader board again! Woohoo!!
Code →AES-Token-Generator.py