Skip to content

Commit

Permalink
exposing to libdar API min iteration count for KDF with argon2 and ot…
Browse files Browse the repository at this point in the history
…her algorithms
  • Loading branch information
Edrusb committed Oct 1, 2024
1 parent 3a0fec4 commit 8870578
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/libdar/archive_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ using namespace std;

namespace libdar
{
// public default values
const infinint default_iteration_count = 200000;
const infinint default_iteration_count_argon2 = 10000;

// general default values

static const U_32 default_crypto_size = 10240;
Expand All @@ -46,8 +50,6 @@ namespace libdar
static const crit_constant_action default_crit_action = crit_constant_action(data_preserve, EA_preserve);
static const string default_user_comment = "N/A";
static const U_32 default_delta_sig_min_size = 10240;
static const infinint default_iteration_count = 200000;
static const infinint default_iteration_count_argon2 = 10000;

// some local helper functions

Expand Down
5 changes: 5 additions & 0 deletions src/libdar/archive_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ namespace libdar
/// \addtogroup API
/// @{

/// default iteration count for all KDF hash algo except argon2
extern const infinint default_iteration_count;

/// default iteration count for argon2 KDF hash
extern const infinint default_iteration_count_argon2;

/// class holding optional parameters used to read an existing archive

Expand Down

0 comments on commit 8870578

Please sign in to comment.