I'm just getting started with Botan. I have included the botan_all.h
in my code file and am linking to the libbotan-2.a
library when building.
Here is the relevant part of main.cpp:
#include "botan_all.h"
int main(int argc, char *argv[])
{
const std::vector<uint8_t> key = Botan::hex_decode("2B7E151628AED2A6ABF7158809CF4F3C");
std::unique_ptr<Botan::Cipher_Mode> enc = Botan::Cipher_Mode::create("AES-128/CBC/PKCS7", Botan::ENCRYPTION);
enc->set_key(key);
}
The enc->set_key(key)
causes a seg fault. What am I missing?