]> git.mxchange.org Git - juser-core.git/commitdiff
unencrypted ... better clear-text ...
authorRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 18:16:53 +0000 (20:16 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Apr 2017 18:16:53 +0000 (20:16 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jusercore/container/login/UserLoginContainer.java
src/org/mxchange/jusercore/model/user/UserUtils.java

index baffc208259d0b2f6076d8d9adc002b5dddba78d..a3fb254a87e8b9f86edd7ebaf243ea16b987a566 100644 (file)
@@ -36,15 +36,15 @@ public class UserLoginContainer implements LoginContainer {
        private User user;
 
        /**
-        * Unencrypted password
+        * Clear-text password
         */
        private String userPassword;
 
        /**
-        * Constructor with user instance and unencrypted password
+        * Constructor with user instance and clear-text password
         * <p>
         * @param user         User instance
-        * @param userPassword Unencrypted password
+        * @param userPassword Clear-text password
         */
        public UserLoginContainer (final User user, final String userPassword) {
                // Is both set?
index 27326a7b26b825184b5f0a5ce2ded1957c1ab4db..ce04147aca51cc449903ba3ad87ae175d3efe967 100644 (file)
@@ -456,26 +456,26 @@ public class UserUtils implements Serializable {
        /**
         * Checks if direct password the updatedUser's password
         * <p>
-        * @param unencryptedPassword Clear-text (direct) password
+        * @param clear-textPassword Clear-text (direct) password
         * @param updatedUser         Updated user instance from database
         * <p>
         * @return Whether the password matches
         */
-       public static boolean ifPasswordMatches (final String unencryptedPassword, final User updatedUser) {
+       public static boolean ifPasswordMatches (final String clear-textPassword, final User updatedUser) {
                // Validate parameters
-               if (null == unencryptedPassword) {
+               if (null == clear-textPassword) {
                        // Throw NPE
-                       throw new NullPointerException("unencryptedPassword is null"); //NOI18N
-               } else if (unencryptedPassword.isEmpty()) {
+                       throw new NullPointerException("clear-textPassword is null"); //NOI18N
+               } else if (clear-textPassword.isEmpty()) {
                        // NPE for user in container
-                       throw new NullPointerException("unencryptedPassword is empty."); //NOI18N
+                       throw new NullPointerException("clear-textPassword is empty."); //NOI18N
                } else if (null == updatedUser) {
                        // And again NPE ...
                        throw new NullPointerException("updatedUser is null"); //NOI18N
                }
 
                // First encrypt password
-               String encryptedPassword = Crypt.crypt(unencryptedPassword, updatedUser.getUserEncryptedPassword());
+               String encryptedPassword = Crypt.crypt(clear-textPassword, updatedUser.getUserEncryptedPassword());
 
                // Is it matching?
                return encryptedPassword.equals(updatedUser.getUserEncryptedPassword());
@@ -484,7 +484,7 @@ public class UserUtils implements Serializable {
        /**
         * Checks if password from container matches with from user instance.
         * <p>
-        * @param container Container holding user instance and unencrypted password
+        * @param container Container holding user instance and clear-text password
         * <p>
         * @return Whether it maches
         */