how to verify the user's entered password in GUI pop-up window?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Jan
2012-3-31
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!