Changed the encoding function to use the OpenSSL EVP_EncodeBlock