How to create a login interaface with a mask password

7 views (last 30 days)
Hi, i'm doing a project for my university and i need to do an interface protected with a login and a recording page.
That interface must be composed by a edit text for the username, and a edit text for the pwd.
The issue is: how can i mask my pwd while i'm writing it, and how can i record new pwd and usernames witout touchin the .m file?
  4 Comments
Stephen23
Stephen23 on 12 Dec 2018
@Andrea Simonotti: just keep in mind that this will NOT be secure. Any MATLAB user can overload functions or change the MATLAB Search Path, which means that they can trivially circumvent your masking.
Guillaume
Guillaume on 12 Dec 2018
I want to cover up the pwd like this: ****
Yes, and as I said, matlab does not have the tool to do that securely. The majority of the tools on the FileExchange (see per's answer) will only be secure against the most casual of attacker. In the first few entries that I've looked at, the only one that may be slightly secure may be https://www.mathworks.com/matlabcentral/fileexchange/19729-passwordentrydialog as it delegates the work to a Java control which you can assume has been written by people who know about security.
Writing cryptographically secure code is very hard. Most of the example you'll find will have the appearance of being secure (you'll see your ****) but are actually not secure, which in my opinion is worse than not trying to be secure as it gives a false sense of security.

Sign in to comment.

Accepted Answer

per isakson
per isakson on 12 Dec 2018
Edited: per isakson on 12 Dec 2018

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!