From 32566e4d640e354adaa83cf9b7240bfc2cdd83e3 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 4 Jan 2021 21:06:31 +0100 Subject: server: Move PASSHASH defines to separate header --- db.c | 4 +--- hashing_settings.h | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 hashing_settings.h diff --git a/db.c b/db.c index 5020b08..a349b44 100644 --- a/db.c +++ b/db.c @@ -5,6 +5,7 @@ #include #include #include "db.h" +#include "hashing_settings.h" #include "schema.sql.h" @@ -12,9 +13,6 @@ #define DATABASE_VERSION 3 -#define PASSHASH_OPSLIMIT 3 -#define PASSHASH_MEMLIMIT crypto_pwhash_MEMLIMIT_INTERACTIVE - #define MAX_DATABASE_SIZE_BYTES ((i64)2 * 1024 * 1024 * 1024) // #define INSECURE_PURE_SPEED diff --git a/hashing_settings.h b/hashing_settings.h new file mode 100644 index 0000000..f4daef0 --- /dev/null +++ b/hashing_settings.h @@ -0,0 +1,7 @@ +#pragma once + +#include + + +#define PASSHASH_OPSLIMIT 3 +#define PASSHASH_MEMLIMIT crypto_pwhash_MEMLIMIT_INTERACTIVE -- cgit v1.2.3-70-g09d2