]> git.mxchange.org Git - juser-core.git/commitdiff
fixed comments
authorRoland Häder <roland@mxchange.org>
Tue, 30 May 2017 08:49:57 +0000 (10:49 +0200)
committerRoland Häder <roland@mxchange.org>
Tue, 30 May 2017 08:58:28 +0000 (10:58 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jusercore/model/user/UserUtils.java

index 3f7968e03442118f28ffbd45fbed1633ba523ecf..aafa2c66b8be91ac4332782a06853a73095c0b92 100644 (file)
@@ -110,7 +110,7 @@ public class UserUtils implements Serializable {
        }
 
        /**
-        * Determines given password's strength: 0 = bad, 100 = best. This method is
+        * Determines given password's strength: 0 = worst, 100 = best. This method is
         * based on
         * http://stackoverflow.com/questions/1614811/how-do-i-measure-the-strength-of-a-password
         * <p>
@@ -131,40 +131,40 @@ public class UserUtils implements Serializable {
                // Init score
                double score = 0.0f;
 
-               //password length
+               // Password length
                score += password.length() * calculateEntropyFactor(password) / 100;
 
-               //password has 3 numbers
+               // Password has 3 numbers
                if (ifRegExFoundInString("(.*[0-9].*[0-9].*[0-9].*)+", password)) { //NOI18N
                        score += 5;
                }
 
-               //password has 2 symbols
+               // Password has 2 symbols
                if (ifRegExFoundInString("(.*[!,@,#,$,%,^,&,*,/,?,_,~,=,.,-,;,:].*[!,@,#,$,%,^,&,*,/,?,_,~,=,.,-,;,:].*)+", password)) { //NOI18N
                        score += 5;
                }
 
-               //password has Upper and Lower chars
+               // Password has Upper and Lower chars
                if (ifRegExFoundInString("(.*[a-z].*[A-Z])|([A-Z].*[a-z].*)+", password)) { //NOI18N
                        score += 10;
                }
 
-               //password has number and chars
+               // Password has number and chars
                if (ifRegExFoundInString("(.*[a-zA-Z].*)+", password) && ifRegExFoundInString("(.*[0-9].*)+", password)) { //NOI18N
                        score += 15;
                }
 
-               //password has number and symbol
+               // Password has number and symbol
                if (ifRegExFoundInString("(.*[!,@,#,$,%,^,&,*,/,?,_,~,=,.,-,;,:].*)+", password) && ifRegExFoundInString("(.*[0-9].*)+", password)) { //NOI18N
                        score += 15;
                }
 
-               //password has char and symbol
+               // Password has char and symbol
                if (ifRegExFoundInString("(.*[!,@,#,$,%,^,&,*,/,?,_,~,=,.,-,;,:].*)+", password) && ifRegExFoundInString("(.*[a-zA-Z].*)+", password)) { //NOI18N
                        score += 15;
                }
 
-               //password is just numbers or chars
+               // Password is just numbers or chars
                if (ifRegExFoundInString("^[a-zA-Z]+$", password) || ifRegExFoundInString("^[0-9]+$", password)) { //NOI18N
                        score -= 10;
                }