From 0b6d9cb4725d059ae8150c3eaa32268dd52d0f5f Mon Sep 17 00:00:00 2001 From: louib Date: Mon, 6 Jan 2020 21:00:39 -0500 Subject: [PATCH] CLI: set decryption time on create. Added an option to set the target decryption time on database creation for the CLI create command. This required some refactoring, in particular the extraction of the min, max and defaut decryption times in the `Kdf` module. Some work was done to allow changing those constant only in the `Kdf` module, should we ever want to change them. --- share/docs/man/keepassxc-cli.1 | 8 ++- src/cli/Create.cpp | 49 +++++++++++++++++-- src/cli/Create.h | 2 + src/crypto/kdf/Kdf.h | 13 +++++ .../DatabaseSettingsWidgetEncryption.cpp | 25 +++++++--- .../DatabaseSettingsWidgetEncryption.h | 6 ++- .../DatabaseSettingsWidgetEncryption.ui | 17 ++----- tests/TestCli.cpp | 42 ++++++++++++++++ 8 files changed, 138 insertions(+), 24 deletions(-) diff --git a/share/docs/man/keepassxc-cli.1 b/share/docs/man/keepassxc-cli.1 index cba3ddb75..d7ab9cdd7 100644 --- a/share/docs/man/keepassxc-cli.1 +++ b/share/docs/man/keepassxc-cli.1 @@ -1,4 +1,4 @@ -.TH KEEPASSXC-CLI 1 "June 15, 2019" +.TH KEEPASSXC-CLI 1 "Jan 04, 2020" .SH NAME keepassxc-cli \- command line interface for the \fBKeePassXC\fP password manager. @@ -179,6 +179,12 @@ Copies the current TOTP instead of current password to clipboard. Will report an error if no TOTP is configured for the entry. +.SS "Create options" + +.IP "\fB-t\fP, \fB--decryption-time\fP