File Exchange

image thumbnail

PassWord Generatro

version 1.0 (1.71 KB) by

PassWord Generator for MatLab



View License

This code generates passwords of length n with specified
 number of digits, lowercase letters and upper case letters. It also uses
famous Knuth algorithm for shuffling

Comments and Ratings (2)

Alex Dytso

Alex Dytso (view profile)

I agree with all of your statements especially the one about entropy. I will submit version 2 shortly. Thank you

Jan Simon

Jan Simon (view profile)

The length of the password and the number of digits, upper and lowercase letters must be specified. Special characters as !"§$%&/()=?*+~#-:;,.-<>|'@^ and space are not possible. This is not a typical strategy to create a password, because this reduces the entropy substantially. A simpler and more efficient approach to get a random password of n characters:
v = char([33:95, 97:27]);
p = v(ceil(rand(1,n)*length(v)));
But it is impossible to remember such passwords and it is very likely that you find them written down under the keyboard.
I prefer passwords like "65eels!NoHeels" or "I sit right beside the 5TH prime".
However, the function works, has a very lean help text, but no H1 line (see LOOKFOR). It would be more efficient to use 'ABC...' instead of ['A', 'B', 'C', ...] and to shuffle the characters of the string instead of creating an index vector at first, shuffle the index and apply it to the string finally.
The unnecessary weakness of the password is the main reason for my low voting.

MATLAB Release
MATLAB 7.6 (R2008a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video