AES encryption/decryption using OpenSSL / C++ and Javascript