DecodeAES = lambda c, e: c.decrypt(base64.b64decode(e)).rstrip(PADDING)
secret = '332SECRETabc1234'
iv = 'HELLOWORLD123456'
cipher = AES.new(key=secret, mode=AES.MODE_CBC, IV=iv)
my_text_to_encode = 'password'
encoded = EncodeAES(cipher, my_text_to_encode)
print('Encrypted string:', encoded)
Encrypt data with python, decrypt in php