Sport Score Passwords
April 23rd, 2002I wanted to generate some reasonable passwords but make them rememberable. I looked into pronounceable passwords, but they relied on dictionaries or other support files, so I came up with a new approach – the Sport Score password. These passwords are designed to be remembered as a College sport score, for instance: Password KY5MA9 is remembered as Kentucky 5, Massachusetts 9.
50 states x 50 states x 10 x 10 = 250,000 unique passwords, good enough for many needs.
Here’s the PHP code…
$aPwd = getPassword(); print "Your password is a sport score: " . $aPwd['password'] . ", pronounced '" . $aPwd['text'] . "'"; function getPassword(){ $aStates = Array ( "ALABAMA" => "AL", "ALASKA" => "AK", "ARIZONA" => "AZ", "ARKANSAS" => "AR", "CALIFORNIA" => "CA", "COLORADO" => "CO", "CONNECTICUT" => "CT", "DELAWARE" => "DE", "FLORIDA" => "FL", "GEORGIA" => "GA", "HAWAII" => "HI", "IDAHO" => "ID", "ILLINOIS" => "IL", "INDIANA" => "IN", "IOWA" => "IA", "KANSAS" => "KS", "KENTUCKY" => "KY", "LOUISIANA" => "LA", "MAINE" => "ME", "MARYLAND" => "MD", "MASSACHUSETTS" => "MA", "MICHIGAN" => "MI", "MINNESOTA" => "MN", "MISSISSIPPI" => "MS", "MISSOURI" => "MO", "MONTANA" => "MT", "NEBRASKA" => "NE", "NEVADA" => "NV", "NEW HAMPSHIRE" => "NH", "NEW JERSEY" => "NJ", "NEW MEXICO" => "NM", "NEW YORK" => "NY", "NORTH CAROLINA" => "NC", "NORTH DAKOTA" => "ND", "OHIO" => "OH", "OKLAHOMA" => "OK", "OREGON" => "OR", "PENNSYLVANIA" => "PA", "RHODE ISLAND" => "RI", "SOUTH CAROLINA" => "SC", "SOUTH DAKOTA" => "SD", "TENNESSEE" => "TN", "TEXAS" => "TX", "UTAH" => "UT", "VERMONT" => "VT", "VIRGINIA" => "VA", "WASHINGTON" => "WA", "WEST VIRGINIA" => "WV", "WISCONSIN" => "WI", "WYOMING" => "WY" ); $aStateNames = array_keys($aStates); $aStateAbbrs = array_values($aStates); $pwd = ''; $txt = ''; $r = rand(0,49); $pwd .= "$aStateAbbrs[$r]"; $txt .= "$aStateNames[$r]"; $r = rand(1,9); $pwd .= "$r"; $txt .= " $r, "; $r = rand(0,49); $pwd .= "$aStateAbbrs[$r]"; $txt .= "$aStateNames[$r]"; $r = rand(1,9); $pwd .= "$r"; $txt .= " $r"; return Array( 'password' => $pwd, 'text' => $txt ); }
Cool idea. I’ll be able to use something like that. (Although if I want to keep the sports theme for my (all German) users, I’d have to use Bundesliga teams or something.)
by PapaScott April 23rd, 2002 at 5:00 pmHow about you use Bundesliga -vs- Premier League? BL4LFC2 for example. Or MU2BL2. Macht dann viel mehr Spass. Solange keiner DE1EN5 benutzt. (Sorry for the German Brent, another chance to entwickle your German skills ;-))
by Armin G. April 26th, 2002 at 7:16 amHow about using favourite book quotes?
ISNFFITMK : I Shall Not Fear, Fear Is The Mind Killer
(from Dune)
or pick your own quote
by Ian Irving April 27th, 2002 at 6:49 pm