how to verify the user's entered password in GUI pop-up window?
1 view (last 30 days)
Show older comments
hi everyone. I'm new in Matlab. I have a question here: I have already create a pop-up window which ask user to type in password and re-type the password.The retype passwords is to verify whether the re-type passwords same with the initial password. can anyone teach me how to d it? thanks
0 Comments
Answers (1)
Jan
on 31 Mar 2012
It sounds trivial: Use strcmp or isequal to compare both strings. If they are different, repeat the password input dialog.
I assume you have a specific problem. Please post the current code and explain what you want to have changed.
However, password protection is a extremely tricky process. Inside an M- or P-file a cheating is trivial. Never store passwords in clear text, because it is very easy to extract them from the function. Better use a hash, e.g. MD5 or SHA-256. And then add "salt" to the password to make a decryption too expensive.
0 Comments
See Also
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!