Accessing Scrypt implementation directly is deprecated.
This commit is contained in:
parent
e5a5dc15f9
commit
d22b125d81
3 changed files with 3 additions and 7 deletions
|
|
@ -1,5 +1,4 @@
|
||||||
#include "KeyStrengthener.h"
|
#include "KeyStrengthener.h"
|
||||||
#include <botan/scrypt.h>
|
|
||||||
#include <botan/base64.h>
|
#include <botan/base64.h>
|
||||||
#include <QSqlError>
|
#include <QSqlError>
|
||||||
#include <QSqlQuery>
|
#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)
|
void KeyStrengthener::saveParams(QSqlDatabase &db, const QString &table_name)
|
||||||
{
|
{
|
||||||
auto sc = dynamic_cast<Botan::Scrypt*>(m_hasher.get());
|
size_t i1 = m_hasher->memory_param();
|
||||||
size_t i1 = sc->N();
|
size_t i2 = m_hasher->iterations();
|
||||||
size_t i2 = sc->r();
|
size_t i3 = m_hasher->parallelism();
|
||||||
size_t i3 = sc->p();
|
|
||||||
|
|
||||||
auto salt_str = QString::fromUtf8(Botan::base64_encode(m_salt).c_str());
|
auto salt_str = QString::fromUtf8(Botan::base64_encode(m_salt).c_str());
|
||||||
// SAVE parameters in database
|
// SAVE parameters in database
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@
|
||||||
#include <botan/hash.h>
|
#include <botan/hash.h>
|
||||||
#include <botan/auto_rng.h>
|
#include <botan/auto_rng.h>
|
||||||
#include <botan/base64.h>
|
#include <botan/base64.h>
|
||||||
#include <botan/scrypt.h>
|
|
||||||
#include <botan/nist_keywrap.h>
|
#include <botan/nist_keywrap.h>
|
||||||
#include <botan/base64.h>
|
#include <botan/base64.h>
|
||||||
#include <botan/mac.h>
|
#include <botan/mac.h>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ using namespace testing;
|
||||||
|
|
||||||
|
|
||||||
#include <botan/pwdhash.h>
|
#include <botan/pwdhash.h>
|
||||||
#include <botan/scrypt.h>
|
|
||||||
|
|
||||||
//TEST(Botan, recreate)
|
//TEST(Botan, recreate)
|
||||||
//{
|
//{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue