return encryptedPassword;
}
+ /**
+ * Generates a pseudo-random user name
+ * <p>
+ * @return User name
+ */
+ public static String generateRandomUserName () {
+ // User name's format is normally "user" + random number (10 digits)
+ String userName = String.format("user%d", RANDOM_NUMBER_GENERATOR.nextInt(10000000)); //NOI18N
+
+ // Return it
+ return userName;
+ }
+
/**
* Checks if password from container matches the updatedUser's password
* <p>
- * @param container Container holding user instance and unencrypted password
+ * @param container Container holding user instance and unencrypted password
* @param updatedUser Updated user instance from database
* <p>
* @return Whether the password matches
return encryptedPassword.equals(container.getUser().getUserEncryptedPassword());
}
- /**
- * Generates a pseudo-random user name
- * <p>
- * @return User name
- */
- public static String generateRandomUserName () {
- // User name's format is normally "user" + random number (10 digits)
- String userName = String.format("user%d", RANDOM_NUMBER_GENERATOR.nextInt(10000000)); //NOI18N
-
- // Return it
- return userName;
- }
-
/**
* No instance from this class
*/