[botan-devel] error: ‘create’ is not a member of

Jack Lloyd jack at randombit.net
Wed Oct 9 11:17:51 EDT 2019

On Wed, Oct 09, 2019 at 09:57:32AM -0400, Jeffrey Walton wrote:
> Hi Everyone,
> I'm piecing together some sample code. I'm working from
> https://botan.randombit.net/handbook/api_ref/cipher_modes.html.
> test3.cxx: In function ‘int main(int, char**)’:
> test3.cxx:21:45: error: ‘create’ is not a member of ‘Botan::XTS_Mode’
>   std::unique_ptr<XTS_Mode> enc =  XTS_Mode::create("AES", ENCRYPTION);

What you are trying to do makes sense, but that API doesn't exist. You want

std::unique_ptr<Cipher_Mode> enc = Cipher_Mode::create("AES-128/XTS", ENCRYPTION);

More information about the botan-devel mailing list