Accessing Scrypt implementation directly is deprecated.

This commit is contained in:
eelke 2024-04-12 06:26:54 +02:00
parent e5a5dc15f9
commit d22b125d81
3 changed files with 3 additions and 7 deletions

View file

@ -1,5 +1,4 @@
#include "KeyStrengthener.h"
#include <botan/scrypt.h>
#include <botan/base64.h>
#include <QSqlError>
#include <QSqlQuery>
@ -38,10 +37,9 @@ Botan::secure_vector<uint8_t> KeyStrengthener::derive(const std::string &passphr
void KeyStrengthener::saveParams(QSqlDatabase &db, const QString &table_name)
{
auto sc = dynamic_cast<Botan::Scrypt*>(m_hasher.get());
size_t i1 = sc->N();
size_t i2 = sc->r();
size_t i3 = sc->p();
size_t i1 = m_hasher->memory_param();
size_t i2 = m_hasher->iterations();
size_t i3 = m_hasher->parallelism();
auto salt_str = QString::fromUtf8(Botan::base64_encode(m_salt).c_str());
// SAVE parameters in database