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.

  • oleg: The author has implemented skewness, kurtosis and checks answering appropriately to the critic.
  • Ashok: how to store 10 or more random number in a loop a loop for i = 1:n mean(i) = input(’enter the mean value...
  • Ben: Doug, Thanks for the very helpful videos! Uitables seem like a convenient way to make a customized property...
  • oleg: Allstats has no checks, no comments and could also be improved (talking about prctile implementatio). Not to...
  • Todd: Additional information and a link to download free MATLAB and Simulink LEGO MINDSTORMS NXT code can be found at...
  • Doug: @Leo, Here is the “English version” of that code. “vec = []” makes an empty variable...
  • leo: Dear Doug I have a question in your code ‘October 9th, 2009 at 13:53′ vec = []; vec = [vec val]; I...
  • Shanker Keshavdas: You sir, are a gentleman and a scholar… No really, helped me out a lot. As to what is...
  • Quan Zheng: how can I get a copy of stepspecs.m?
  • Doug: @Lucy I think this is what you seek to move a line with the mouse in MATLAB. http://blogs.math...

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