Реализовываю алгоритм шифрования Twofish через криптобиблиотеку Botan-2.17.2. Не распознает Botan::LibraryInitializer init. Помогите решить
листинг
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "botan/botan.h"
#include "botan/pipe.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
Botan::LibraryInitializer init;
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_EncryptDecrypt_clicked()
{
Botan::AutoSeeded_RNG rng;
//key 256 bit
Botan::SymmetricKey key (rng,32);
//iv 128 bit
Botan::InitializationVector iv (rng,16);
Botan::Pipe pipe(Botan::get_cipher("Twofish/CBC",key, iv ,Botan::ENCRYPTION), new Botan::Hex_Encoder);
//input
pipe.process_msg(ui->textEdit_Input->toPlainText().toStdString());
std::string cipcherText=pipe.read_all_as_string();
ui->textEdit_OutputEncrypt->setText(QString::fromStdString(cipcherText));
//Decrypt
Botan::Pipe pipe1(new Botan::Hex_Decoder,Botan::get_cipher("Twofish/CBC",key, iv,Botan::DECRYPTION));
pipe1.process_msg(ui->textEdit_OutputEncrypt->toPlainText().toStdString());
std::string plaintext=pipe1.read_all_as_string();
ui->textEdit_OutputDecrypt->setText(QString::fromStdString(plaintext));
}