File Exchange Pick of the Week

October 5th, 2007

Masking typed passwords with asterisks

Sometimes really good files fly under my radar here at the File Exchange. Thankfully, my buddy Brett noticed this little gem. Here is what he had to say about it:

A customer recently mentioned that he wanted to provide username and password information to a function for reading and writing URLs in a password-protected environment. Modifying URLREAD to take additional inputs was easy, and it wasn’t too difficult to extract from some CSSM conversations an approach to modifying the core-MATLAB function to authenticate the password. My initial coding approach, however, required that the user visibly type (and therefore display) his password on his monitor. So the next step was implementing a dialog box that would hide passwords with a string of asterisks. While not an exceptionally daunting task, this is not necessarily trivial, either. But a quick search of the File Exchange revealed that Jeremy Smith had already implemented and posted code to do just that, in his LOGIN submission. I was able to steer the customer to Jeremy’s code, and save both of us a good bit of coding—and isn’t that what the FEX is all about? While LOGIN may not suffice for extremely secure environments, its visual masking of passwords sufficed for this customer, and for most applications that I can think of. Nice work, Jeremy!

Video Content


Get the file here.

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Bob, Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

  • Zach: Hi Doug and Les, I didn’t have a lot of time to mess with this, but I did find a work-around. I plotted...
  • hamed: k
  • Les: @Zach This isn’t exactly what you are looking for but at least it puts all three parameters on the same...
  • Zach: Thanks for your suggestions Doug. I’ll give that a shot and see what happens. I’ve seen many of...
  • Doug: @Zach, I would say to use plotYYY, because that is close to what you want, but using depth as Y makes sense....
  • Doug: @Teja, I think this will work: http://www.mathworks .com/access/helpdesk /help/techdoc/ref...
  • Gify: merry christmas :) nice christmas tree! Regards, Janet Gify
  • Teja: Dear Doug Is there anyway to plot a surface from nonuniform data without meshgrid and griddata? Basically i...
  • Zach: I’m working with geophysical data, so I’d like to produce a depth profile. The y-axis would be...
  • Doug: @Ashok First, please do not use variable names that are MATLAB commands (std and mean). Second, p(j) should be...

These postings are the author's and don't necessarily represent the opinions of The MathWorks.