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!