Java Password Verifier Program
I am trying to complete my programming assignment, I have to create a 'Password verifier' that has 1 uppercase, 1 lowercase, 1 number, and 1 special character. I just wrote this password validation code function that checks to see if a password will be accepted in. Password validation in Java. Book program with. Password checking program: Needto check length, num and char values.
Welcome to LearnProgramming! Asking debugging questions When posting a question about code, you must include the following:. A. A of the problem. A, and program that illustrates your problem.
The output you expected, and what you got instead. If you got an error, include the full error message. See for more info. Asking conceptual questions Many conceptual questions have already been asked and answered. Read our page and search old posts before asking your question. If your question is similar to one in the FAQ, explain how it's different. See for more info.
Other guidelines and links. Subreddit rules. No Rewards: You may not ask for or offer payment when giving or receiving help. Good Content: Any external resources linked to should be up-to-date and correct. Good Comments: Abusive, racist, or derogatory comments towards individuals or groups are not permitted. No Referral Links: Do not post referral links to Amazon or other sites. No Complete Solutions: Do not give out complete solutions.
Guide the OP to the solution, but do not solve it for them. No piracy: Do not ask for or post links to pirated or illegal material. We also don't allow suggestions of piracy. Do not delete your posts! Your problem may be solved, but others who have similar problems could profit from the solution/discussion in the thread. Use the 'solved' flair instead.
Java Password Verifier Program
No bot tutorials: Tutorials about creating reddit bots are not allowed on this subreddit. They historically create lots of unnecessary work for moderators of many different subreddits. Lineage 2 enchant calculator.
For more details, see our. If you see any posts or comments violating these rules, please report them. Even if your professor's book isn't something you enjoy, it probably is the most applicable to his class (for obvious reasons). I always found that emulating the examples (that is being able to see what his program is trying to do, and doing it on your own, and then comparing with his final product) was a great way to practice when I was first starting out. Hopefully that book also has questions which will require you to code and will also help you when you do end up taking the class. Lastly, check out that Head First Java book as well as the many online resources available to you. Good luck and welcome to!
Almost everything as been said about your code., but there is at least one last thing to say that is very important, that maaartinus mention in his: don't log passwords. In this nature, passwords should be secret and known only to the holder of the account. I hope when you're storing your password you will do everything to protect it (hash, salt, etc). The problem is if you logged it, no matter how you protected it when you stored it, it will be logged forever in clear text. Logs are generally accessible and can be read by people that should probably not see the password of your user.
This is a security issue and could be a severe security issue. If you needed some output, you could use logger.debug which is most of time not activated in production, but keep in mind that you should not trust logging configurations in terms of security. The best option is to remove the password from the logging.