#include #include #include #include #include int aes_init(unsigned char *key_data, int key_data_len, EVP_CIPHER_CTX *e_ctx, EVP_CIPHER_CTX *d_ctx){ int i; unsigned char key[32], iv[32]; //Some robust programming to start with //Only use most significant 32 bytes of data if > 32 bytes if(key_data_len > 32) key_data_len =32; //Copy bytes to the front of the key array for (i=0;i