From 8b1c8f69f74770f3a12524d1784f9da108f29b68 Mon Sep 17 00:00:00 2001 From: louib Date: Thu, 14 Dec 2017 20:22:59 -0500 Subject: [PATCH] Removing password output from Estimate. (#1281) * Removing password output from Estimate. * clang-format --- src/cli/Estimate.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/cli/Estimate.cpp b/src/cli/Estimate.cpp index fbab96962..80226a27e 100644 --- a/src/cli/Estimate.cpp +++ b/src/cli/Estimate.cpp @@ -42,13 +42,13 @@ Estimate::~Estimate() { } -static void calculate(const char* pwd, bool advanced) +static void estimate(const char* pwd, bool advanced) { double e; int len = strlen(pwd); if (!advanced) { e = ZxcvbnMatch(pwd, 0, 0); - printf("Pass '%s' \tLength %d\tEntropy %.3f\tLog10 %.3f\n", pwd, len, e, e * 0.301029996); + printf("Length %d\tEntropy %.3f\tLog10 %.3f\n", len, e, e * 0.301029996); } else { int ChkLen; ZxcMatch_t *info, *p; @@ -58,12 +58,7 @@ static void calculate(const char* pwd, bool advanced) m += p->Entrpy; } m = e - m; - printf("Pass '%s' \tLength %d\tEntropy %.3f\tLog10 %.3f\n Multi-word extra bits %.1f\n", - pwd, - len, - e, - e * 0.301029996, - m); + printf("Length %d\tEntropy %.3f\tLog10 %.3f\n Multi-word extra bits %.1f\n", len, e, e * 0.301029996, m); p = info; ChkLen = 0; while (p) { @@ -170,6 +165,6 @@ int Estimate::execute(QStringList arguments) password = inputTextStream.readLine(); } - calculate(password.toLatin1(), parser.isSet(advancedOption)); + estimate(password.toLatin1(), parser.isSet(advancedOption)); return EXIT_SUCCESS; }