Skip to content

Rename EntropyMeter -> Estimate #1250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 4, 2017
Merged

Rename EntropyMeter -> Estimate #1250

merged 6 commits into from
Dec 4, 2017

Conversation

louib
Copy link
Member

@louib louib commented Dec 3, 2017

The entropy-meter CLI command was lagging behind the other commands in terms of style, interface and documentation.

Description

  • renamed entropy-meter to estimate, since all the other commands are verbs
  • Used QCommandLineParser for the arguments
  • Only allow 1 password (via stdin or CLI arg)
  • clang-format the whole cli directory
  • Updated the man page.

How has this been tested?

Locally

Screenshots (if appropriate):

$ keepassxc-cli estimate
password
Pass 'password' 	Length 8	Entropy 1.000	Log10 0.301
$ keepassxc-cli estimate password
Pass 'password' 	Length 8	Entropy 1.000	Log10 0.301
$ keepassxc-cli estimate password -a
Pass 'password' 	Length 8	Entropy 1.000	Log10 0.301
  Multi-word extra bits 0.0
  Type: Dictionary       Length 8  Entropy  1.000 (0.30) password
$ keepassxc-cli estimate -a
password
Pass 'password' 	Length 8	Entropy 1.000	Log10 0.301
  Multi-word extra bits 0.0
  Type: Dictionary       Length 8  Entropy  1.000 (0.30) password
$ keepassxc-cli estimate invalid number of args
Usage: ./src/cli/keepassxc-cli estimate [options] [password]
Estimate the entropy of a password.

Options:
  -a, --advanced  Perform advanced analysis on the password.

Arguments:
  password        Password for which to estimate the entropy.

Types of changes

  • ✅ Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • ✅ I have read the CONTRIBUTING document. [REQUIRED]
  • ✅ My code follows the code style of this project. [REQUIRED]
  • ✅ All new and existing tests passed. [REQUIRED]
  • ✅ I have compiled and verified my code with -DWITH_ASAN=ON. [REQUIRED]
  • ✅ My change requires a change to the documentation and I have updated it accordingly.

@louib louib requested a review from a team December 3, 2017 18:20
@louib louib added this to the v2.3.0 milestone Dec 3, 2017
p = p->Next;
}
ZxcvbnFreeInfo(info);
if (ChkLen != len)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing {

parser.process(arguments);

const QStringList args = parser.positionalArguments();
if (args.size() != 1 && args.size() != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about args.size() > 1 ?

@louib louib merged commit 471e684 into develop Dec 4, 2017
@louib louib deleted the estimate branch December 4, 2017 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants